diff --git a/doc/api/crypto.md b/doc/api/crypto.md index 91cb32a1b9816f..b4be4e2d51bdcf 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -3773,6 +3773,8 @@ using the given `algorithm`. Optional `options` argument controls stream behavior. For XOF hash functions such as `'shake256'`, the `outputLength` option can be used to specify the desired output length in bytes. +When the data is small (< 5MB) and readily available, [`crypto.hash()`][] is usually faster. + The `algorithm` is dependent on the available algorithms supported by the version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc. On recent releases of OpenSSL, `openssl list -digest-algorithms` will @@ -6935,6 +6937,7 @@ See the [list of SSL OP Flags][] for details. [`crypto.getCurves()`]: #cryptogetcurves [`crypto.getDiffieHellman()`]: #cryptogetdiffiehellmangroupname [`crypto.getHashes()`]: #cryptogethashes +[`crypto.hash()`]: #cryptohashalgorithm-data-options [`crypto.privateDecrypt()`]: #cryptoprivatedecryptprivatekey-buffer [`crypto.privateEncrypt()`]: #cryptoprivateencryptprivatekey-buffer [`crypto.publicDecrypt()`]: #cryptopublicdecryptkey-buffer