Skip to content

Commit 7910542

Browse files
save file
1 parent 71c70f1 commit 7910542

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

  • blog/26-04-26/x509-certificates-in-js---encrypt-decrypt-data/ex

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@
1313
var secret = 'hello world';
1414
var blob = new Blob([secret]);
1515

16+
1617
var encrypted_blob = await encrypt(blob,cert);
1718
var b64 = await blob_b64(encrypted_blob);
1819
console.log('Encrypted:',b64);
20+
21+
var encrypted_blob = b64_blob(b64);
1922
var blob = await decrypt(encrypted_blob,key);
2023
var decrypted = await blob.text();
2124
console.log('Decrypted:', decrypted);

0 commit comments

Comments
 (0)