Skip to content

Commit

Permalink
doc: replaced intended deriveKey to parameter instead of deriveBits
Browse files Browse the repository at this point in the history
Example intends to use deriveKey but uses deriveBits to the subtle.importKey method which does not produce the required response.

Fixes: nodejs#38115
  • Loading branch information
hassaanp committed Apr 7, 2021
1 parent 6986fa0 commit b081766
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 @@ -275,7 +275,7 @@ async function pbkdf2Key(pass, salt, iterations = 1000, length = 256) {
ec.encode(pass),
'PBKDF2',
false,
['deriveBits']);
['deriveKey']);
const key = await subtle.deriveKey({
name: 'PBKDF2',
hash: 'SHA-512',
Expand Down

0 comments on commit b081766

Please sign in to comment.