|
|
@ -101,11 +101,13 @@ async function getNotificationCount() { |
|
|
|
if (did == activeDid) { |
|
|
|
let publicKeyHex = account["publicKeyHex"]; |
|
|
|
let identity = account["identity"]; |
|
|
|
result = publicKeyHex; |
|
|
|
const messageWithNonceAsUint8Array = self.decodeBase64(identity); |
|
|
|
const nonce = messageWithNonceAsUint8Array.slice(0, 24); |
|
|
|
const message = messageWithNonceAsUint8Array.slice(24, identity.length); |
|
|
|
const decoder = new TextDecoder("utf-8"); |
|
|
|
const decrypted = self.secretbox.open(message, nonce, secretUint8Array); |
|
|
|
|
|
|
|
result = decrypted; |
|
|
|
|
|
|
|
break; |
|
|
|
} |
|
|
|