doc: use length argument in pbkdf2Key

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: https://github.com/nodejs/node/pull/51066
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
Tobias Nießen authored and Richard Lau committed 2024-03-25 17:28:12 +00:00
1 parent bac982bce5
commit 1cd27b6eff
1 file changed
+1 -1
+1 -1
View File
@@ -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;
}