From 0060e499235a88693d2b884f5067afa9d4a5793f Mon Sep 17 00:00:00 2001 From: Silver <14016168+silversquirl@users.noreply.github.com> Date: Thu, 27 Apr 2023 15:45:32 +0100 Subject: fix: make node:crypto Hash.copy work correctly (#2761) This commit will also: - add a CryptoHasher.copy function - make CryptoHasher.digest reset the hasher so it can be reused Resolves #2651 --- src/bun.js/api/crypto.classes.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/bun.js/api/crypto.classes.ts') diff --git a/src/bun.js/api/crypto.classes.ts b/src/bun.js/api/crypto.classes.ts index 2f686a69d..b97ed4b1a 100644 --- a/src/bun.js/api/crypto.classes.ts +++ b/src/bun.js/api/crypto.classes.ts @@ -63,6 +63,10 @@ export default [ fn: "update", length: 2, }, + copy: { + fn: "copy", + length: 0, + }, byteLength: { getter: "getByteLength", }, -- cgit v1.2.3