瀏覽代碼

Merge branch 'file-upload' into collection-ops

Abhinav-grd 4 年之前
父節點
當前提交
cf1cb28320
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/utils/crypto/libsodium.ts

+ 1 - 1
src/utils/crypto/libsodium.ts

@@ -177,7 +177,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) {