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
path: root/doc/api
diff options
context:
space:
mode:
authorTobias Nießen <tniessen@tnie.de>2021-07-20 22:15:50 +0300
committerJames M Snell <jasnell@gmail.com>2021-07-26 18:41:42 +0300
commit1229d49e39468cfb8b0d46e4822ee599586bd66b (patch)
treeb2dd43ab01281b9cf94cbec7263e72168d491557 /doc/api
parentfc6de093e2bacfbc74072e89d29f2c5f82481e44 (diff)
doc,lib,test: rename HKDF 'key' argument
PR-URL: https://github.com/nodejs/node/pull/39474 Refs: https://github.com/nodejs/node/issues/39471 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'doc/api')
-rw-r--r--doc/api/crypto.md16
1 files changed, 8 insertions, 8 deletions
diff --git a/doc/api/crypto.md b/doc/api/crypto.md
index ffe7e342b4e..c7ac0801d89 100644
--- a/doc/api/crypto.md
+++ b/doc/api/crypto.md
@@ -3839,14 +3839,14 @@ const {
console.log(getHashes()); // ['DSA', 'DSA-SHA', 'DSA-SHA1', ...]
```
-### `crypto.hkdf(digest, key, salt, info, keylen, callback)`
+### `crypto.hkdf(digest, ikm, salt, info, keylen, callback)`
<!-- YAML
added: v15.0.0
-->
* `digest` {string} The digest algorithm to use.
-* `key` {string|ArrayBuffer|Buffer|TypedArray|DataView|KeyObject} The secret
- key. It must be at least one byte in length.
+* `ikm` {string|ArrayBuffer|Buffer|TypedArray|DataView|KeyObject} The input
+ keying material. It must be at least one byte in length.
* `salt` {string|ArrayBuffer|Buffer|TypedArray|DataView} The salt value. Must
be provided but can be zero-length.
* `info` {string|ArrayBuffer|Buffer|TypedArray|DataView} Additional info value.
@@ -3859,7 +3859,7 @@ added: v15.0.0
* `err` {Error}
* `derivedKey` {Buffer}
-HKDF is a simple key derivation function defined in RFC 5869. The given `key`,
+HKDF is a simple key derivation function defined in RFC 5869. The given `ikm`,
`salt` and `info` are used with the `digest` to derive a key of `keylen` bytes.
The supplied `callback` function is called with two arguments: `err` and
@@ -3892,14 +3892,14 @@ hkdf('sha512', 'key', 'salt', 'info', 64, (err, derivedKey) => {
});
```
-### `crypto.hkdfSync(digest, key, salt, info, keylen)`
+### `crypto.hkdfSync(digest, ikm, salt, info, keylen)`
<!-- YAML
added: v15.0.0
-->
* `digest` {string} The digest algorithm to use.
-* `key` {string|ArrayBuffer|Buffer|TypedArray|DataView|KeyObject} The secret
- key. It must be at least one byte in length.
+* `ikm` {string|ArrayBuffer|Buffer|TypedArray|DataView|KeyObject} The input
+ keying material. It must be at least one byte in length.
* `salt` {string|ArrayBuffer|Buffer|TypedArray|DataView} The salt value. Must
be provided but can be zero-length.
* `info` {string|ArrayBuffer|Buffer|TypedArray|DataView} Additional info value.
@@ -3911,7 +3911,7 @@ added: v15.0.0
* Returns: {ArrayBuffer}
Provides a synchronous HKDF key derivation function as defined in RFC 5869. The
-given `key`, `salt` and `info` are used with the `digest` to derive a key of
+given `ikm`, `salt` and `info` are used with the `digest` to derive a key of
`keylen` bytes.
The successfully generated `derivedKey` will be returned as an {ArrayBuffer}.