Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 086103b

Browse filesBrowse files
calebboydrvagg
authored andcommitted
doc: show keylen in pbkdf2 as a byte length
Ensure that keylen for pbkdf2 is documented as a length of bytes and not bits. PR-URL: #3334 Reviewed-By: Fedor Indutny <fedor@indutny.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
1 parent 4c80c02 commit 086103b
Copy full SHA for 086103b

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Collapse file

‎doc/api/crypto.markdown‎

Copy file name to clipboardExpand all lines: doc/api/crypto.markdown
+2-2Lines changed: 2 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -621,13 +621,13 @@ Example (obtaining a shared secret):
621621
## crypto.pbkdf2(password, salt, iterations, keylen[, digest], callback)
622622

623623
Asynchronous PBKDF2 function. Applies the selected HMAC digest function
624-
(default: SHA1) to derive a key of the requested length from the password,
624+
(default: SHA1) to derive a key of the requested byte length from the password,
625625
salt and number of iterations. The callback gets two arguments:
626626
`(err, derivedKey)`.
627627

628628
Example:
629629

630-
crypto.pbkdf2('secret', 'salt', 4096, 512, 'sha256', function(err, key) {
630+
crypto.pbkdf2('secret', 'salt', 4096, 64, 'sha256', function(err, key) {
631631
if (err)
632632
throw err;
633633
console.log(key.toString('hex')); // 'c5e478d...1469e50'

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.