From 182d3f1567eb37a01c278f5912ee48d6e4546642 Mon Sep 17 00:00:00 2001 From: Samual Norman Date: Fri, 8 Sep 2023 17:32:36 +0100 Subject: Fix `Bun.CryptoHasher` missing argument in docs (#4585) --- docs/api/hashing.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/api') diff --git a/docs/api/hashing.md b/docs/api/hashing.md index 0a32b567d..13d09dbfe 100644 --- a/docs/api/hashing.md +++ b/docs/api/hashing.md @@ -132,7 +132,7 @@ hasher.digest(); Once initialized, data can be incrementally fed to to the hasher using `.update()`. This method accepts `string`, `TypedArray`, and `ArrayBuffer`. ```ts -const hasher = new Bun.CryptoHasher(); +const hasher = new Bun.CryptoHasher("sha256"); hasher.update("hello world"); hasher.update(new Uint8Array([1, 2, 3])); @@ -170,7 +170,7 @@ hasher.update("hello world", "latin1"); After the data has been feed into the hasher, a final hash can be computed using `.digest()`. By default, this method returns a `Uint8Array` containing the hash. ```ts -const hasher = new Bun.CryptoHasher(); +const hasher = new Bun.CryptoHasher("sha256"); hasher.update("hello world"); hasher.digest(); -- cgit v1.2.3