node/lib/internal/crypto
Joyee Cheung 78c226281c crypto: implement crypto.hash()
This patch introduces a helper crypto.hash() that computes
a digest from the input at one shot. This can be 1.2-1.6x faster
than the object-based createHash() for smaller inputs (<= 5MB)
that are readily available (not streamed) and incur less memory
overhead since no intermediate objects will be created.

PR-URL: https://github.com/nodejs/node/pull/51044
Refs: https://github.com/nodejs/performance/issues/136
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
2024-02-29 12:54:51 +01:00
..
aes.js crypto: use WebIDL converters in WebCryptoAPI 2023-01-17 08:57:58 +00:00
certificate.js
cfrg.js crypto: remove webcrypto EdDSA key checks and properties 2023-09-01 12:00:16 +00:00
cipher.js crypto: remove default encoding from cipher 2023-05-16 01:22:33 +00:00
diffiehellman.js crypto: remove default encoding from DiffieHellman 2023-08-16 15:23:06 +00:00
ec.js crypto: ensure valid point on elliptic curve in SubtleCrypto.importKey 2023-10-23 08:19:41 +02:00
hash.js crypto: implement crypto.hash() 2024-02-29 12:54:51 +01:00
hashnames.js lib: enforce use of trailing commas 2023-03-06 10:44:14 +01:00
hkdf.js errors: improve hideStackFrames 2023-11-14 09:18:05 +01:00
keygen.js lib: enforce use of trailing commas 2023-03-06 10:44:14 +01:00
keys.js crypto: update CryptoKey symbol properties 2024-01-02 15:05:22 -03:00
mac.js crypto: use WebIDL converters in WebCryptoAPI 2023-01-17 08:57:58 +00:00
pbkdf2.js crypto: remove default encoding from pbkdf2 2023-05-07 00:49:59 +00:00
random.js crypto: unify validation of checkPrime checks 2023-03-22 11:41:06 +00:00
rsa.js lib: enforce use of trailing commas 2023-03-06 10:44:14 +01:00
scrypt.js crypto: remove default encoding from scrypt 2023-05-12 00:01:48 +00:00
sig.js crypto: remove default encoding from sign/verify 2023-08-15 21:01:39 +00:00
util.js crypto: use EVP_MD_fetch and cache EVP_MD for hashes 2024-02-15 12:00:56 +01:00
webcrypto.js crypto: remove webcrypto EdDSA key checks and properties 2023-09-01 12:00:16 +00:00
webidl.js stream: treat compression web stream format per its WebIDL definition 2023-11-23 10:15:41 +01:00
x509.js src: distinguish HTML transferable and cloneable 2023-07-07 17:00:00 +00:00