Skip to content

Commit

Permalink
doc: use length argument in pbkdf2Key
Browse files Browse the repository at this point in the history
The optional `length` argument is supposed to determine the
length of the AES-GCM key, so it may be 128, 192, or 256.

PR-URL: #51066
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
tniessen authored and RafaelGSS committed Dec 15, 2023
1 parent c3c8237 commit 539bee4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/api/webcrypto.md
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ async function pbkdf2Key(pass, salt, iterations = 1000, length = 256) {
iterations,
}, keyMaterial, {
name: 'AES-GCM',
length: 256,
length,
}, true, ['encrypt', 'decrypt']);
return key;
}
Expand Down

0 comments on commit 539bee4

Please sign in to comment.