diff --git a/src/utils/crypto/libsodium.ts b/src/utils/crypto/libsodium.ts index 4735d57f1..8481af46d 100644 --- a/src/utils/crypto/libsodium.ts +++ b/src/utils/crypto/libsodium.ts @@ -168,7 +168,7 @@ export async function generateKeyPair() { export async function boxSealOpen(input: string, publicKey: string, secretKey: string) { await sodium.ready; - return await toB64(sodium.crypto_box_seal_open(input, await fromB64(publicKey), await fromB64(secretKey))); + return await toB64(sodium.crypto_box_seal_open(await fromB64(input), await fromB64(publicKey), await fromB64(secretKey))); } export async function fromB64(input: string) {