doc: remove ArrayBuffer from crypto.hash() data parameter type

PR-URL: https://github.com/nodejs/node/pull/52069
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
This commit is contained in:
fengmk2 2024-03-13 23:56:33 +08:00 committed by GitHub
parent 25a6fb6a07
commit 57d2e4881c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3510,7 +3510,7 @@ Computes the Diffie-Hellman secret based on a `privateKey` and a `publicKey`.
Both keys must have the same `asymmetricKeyType`, which must be one of `'dh'`
(for Diffie-Hellman), `'ec'` (for ECDH), `'x448'`, or `'x25519'` (for ECDH-ES).
### `crypto.hash(algorith, data[, outputEncoding])`
### `crypto.hash(algorithm, data[, outputEncoding])`
<!-- YAML
added:
@ -3520,7 +3520,7 @@ added:
> Stability: 1.2 - Release candidate
* `algorithm` {string|undefined}
* `data` {string|ArrayBuffer|Buffer|TypedArray|DataView} When `data` is a
* `data` {string|Buffer|TypedArray|DataView} When `data` is a
string, it will be encoded as UTF-8 before being hashed. If a different
input encoding is desired for a string input, user could encode the string
into a `TypedArray` using either `TextEncoder` or `Buffer.from()` and passing