From 19ad6b8f72a9503d395d907bd9c190e816db3bed Mon Sep 17 00:00:00 2001 From: Tobias Nießen Date: Fri, 14 Sep 2018 13:02:44 +0200 Subject: crypto: deprecate digest == null in PBKDF2 I assume that permitting digest === null was unintentional when digest === undefined was deprecated since their behavior was equivalent. The sha1 default for digest === null has somehow made it through refactoring of the PBKDF2 module multiple times, even though digest === undefined has been EOL for some time now. This change deprecates setting digest to null so we can fix the behavior in Node.js 12 or so. PR-URL: https://github.com/nodejs/node/pull/22861 Reviewed-By: Anna Henningsen Reviewed-By: Luigi Pinca Reviewed-By: James M Snell --- doc/api/crypto.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'doc/api/crypto.md') diff --git a/doc/api/crypto.md b/doc/api/crypto.md index 06d9281ba4..b7bf532d2f 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -1786,8 +1786,8 @@ otherwise `err` will be `null`. By default, the successfully generated `derivedKey` will be passed to the callback as a [`Buffer`][]. An error will be thrown if any of the input arguments specify invalid values or types. -If `digest` is `null`, `'sha1'` will be used. This behavior will be deprecated -in a future version of Node.js. +If `digest` is `null`, `'sha1'` will be used. This behavior is deprecated, +please specify a `digest` explicitely. The `iterations` argument must be a number set as high as possible. The higher the number of iterations, the more secure the derived key will be, @@ -1852,8 +1852,8 @@ applied to derive a key of the requested byte length (`keylen`) from the If an error occurs an `Error` will be thrown, otherwise the derived key will be returned as a [`Buffer`][]. -If `digest` is `null`, `'sha1'` will be used. This behavior will be deprecated -in a future version of Node.js. +If `digest` is `null`, `'sha1'` will be used. This behavior is deprecated, +please specify a `digest` explicitely. The `iterations` argument must be a number set as high as possible. The higher the number of iterations, the more secure the derived key will be, -- cgit v1.2.3