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 and marco-ippolito committed May 3, 2024
1 parent 7f575c8 commit a6473a8
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 @@ -3630,7 +3630,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 @@ -3640,7 +3640,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 a6473a8

Please sign in to comment.