Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLivia Medeiros <74449973+LiviaMedeiros@users.noreply.github.com>2022-05-04 22:31:23 +0300
committerGitHub <noreply@github.com>2022-05-04 22:31:23 +0300
commita5b87305255f4757545b1d9f60a5e6f94cb742c8 (patch)
tree0597847be26f5c78ebf5ae3b1ac6fdeac031ab0f /doc/api/crypto.md
parent2454aa0f1fdd41486268f711a6ad53756350f608 (diff)
crypto: adjust minimum length in generateKey('hmac', ...)
Also affects generateKeySync('hmac', ...) PR-URL: https://github.com/nodejs/node/pull/42944 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'doc/api/crypto.md')
-rw-r--r--doc/api/crypto.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/api/crypto.md b/doc/api/crypto.md
index 8e0e37e5fed..4228abd800f 100644
--- a/doc/api/crypto.md
+++ b/doc/api/crypto.md
@@ -3630,7 +3630,7 @@ changes:
* `options`: {Object}
* `length`: {number} The bit length of the key to generate. This must be a
value greater than 0.
- * If `type` is `'hmac'`, the minimum is 1, and the maximum length is
+ * If `type` is `'hmac'`, the minimum is 8, and the maximum length is
2<sup>31</sup>-1. If the value is not a multiple of 8, the generated
key will be truncated to `Math.floor(length / 8)`.
* If `type` is `'aes'`, the length must be one of `128`, `192`, or `256`.
@@ -3902,7 +3902,7 @@ added: v15.0.0
accepted values are `'hmac'` and `'aes'`.
* `options`: {Object}
* `length`: {number} The bit length of the key to generate.
- * If `type` is `'hmac'`, the minimum is 1, and the maximum length is
+ * If `type` is `'hmac'`, the minimum is 8, and the maximum length is
2<sup>31</sup>-1. If the value is not a multiple of 8, the generated
key will be truncated to `Math.floor(length / 8)`.
* If `type` is `'aes'`, the length must be one of `128`, `192`, or `256`.