Skip to content

Commit

Permalink
doc: remove ArrayBuffer from crypto.hash() data parameter type
Browse files Browse the repository at this point in the history
PR-URL: #52069
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
  • Loading branch information
fengmk2 authored Mar 13, 2024
1 parent 25a6fb6 commit 57d2e48
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/api/crypto.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit 57d2e48

Please sign in to comment.