Skip to content

Commit 50f5cfa

Browse files
save file
1 parent f5bf300 commit 50f5cfa

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

blog/26-04-26/x509-certificates-in-js---encrypt-decrypt-data/ex/aes-encrypt-decrypt-browser.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,11 @@ aes encrypt / decrypt browser
9393

9494
async function aesDecrypt(key,blob){
9595

96-
var {iv,data} = await blob_iv_buf(blob);
96+
var {iv,buf} = await blob_iv_buf(blob);
9797

9898
var algorithm = {name:'AES-GCM',iv};
9999
key = key;
100-
data = data.buffer;
100+
data = buf.buffer;
101101

102102
var buf = await crypto.subtle.decrypt(algorithm,key,data);
103103

@@ -123,7 +123,7 @@ aes encrypt / decrypt browser
123123
}//iv_buf
124124

125125

126-
async function blob_iv_buf(blob,iv_bits=96){
126+
async function blob_iv_buf(blob,iv_bits=96){debugger;
127127

128128
var bytes = iv_bits/8;
129129
var n = blob.size;

0 commit comments

Comments
 (0)