diff options
author | 2023-04-27 15:45:32 +0100 | |
---|---|---|
committer | 2023-04-27 07:45:32 -0700 | |
commit | 0060e499235a88693d2b884f5067afa9d4a5793f (patch) | |
tree | 97d0977e6355c796a430d152d1a73746963cbebb /src/bun.js/api/crypto.classes.ts | |
parent | 87921520e45a2c8e44ab7dc844da2641a83bd164 (diff) | |
download | bun-0060e499235a88693d2b884f5067afa9d4a5793f.tar.gz bun-0060e499235a88693d2b884f5067afa9d4a5793f.tar.zst bun-0060e499235a88693d2b884f5067afa9d4a5793f.zip |
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
Diffstat (limited to 'src/bun.js/api/crypto.classes.ts')
-rw-r--r-- | src/bun.js/api/crypto.classes.ts | 4 |
1 files changed, 4 insertions, 0 deletions
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", }, |