diff options
-rw-r--r-- | docs/api/hashing.md | 4 |
1 files changed, 2 insertions, 2 deletions
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(); |