We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 51bfd5b commit 0a174a8Copy full SHA for 0a174a8
1 file changed
blog/26-04-26/x509-certificates-in-js---encrypt-decrypt-data/ex/aes-encrypt-decrypt-browser.js
@@ -49,9 +49,9 @@ TypedArray.prototype.slice() : https://developer.mozilla.org/en-US/docs/Web
49
50
51
52
- async function generateAesKey(){
+ async function generateAesKey(length=256){
53
54
- var algorithm = {name:'AES-GCM',length:256};
+ var algorithm = {name:'AES-GCM',length};
55
var extractable = true;
56
var keyusages = ['encrypt','decrypt'];
57
0 commit comments