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 richardlau committed Mar 25, 2024
1 parent bac982b commit 1cd27b6
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 @@ -328,7 +328,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 1cd27b6

Please sign in to comment.