method
CryptoHasher.hash
Run the hash over the given data
@param input
string, Uint8Array, or ArrayBuffer to hash. Uint8Array or ArrayBuffer is faster.
hashInto: TypedArray
): TypedArray;
Run the hash over the given data
@param input
string, Uint8Array, or ArrayBuffer to hash. Uint8Array or ArrayBuffer is faster.
@param hashInto
TypedArray to write the hash into. Faster than creating a new one each time
): string;
Run the hash over the given data
@param input
string, Uint8Array, or ArrayBuffer to hash. Uint8Array or ArrayBuffer is faster.
@param encoding
DigestEncoding to return the hash in
Referenced types
type SupportedCryptoAlgorithms =
| 'blake2b256'
| 'blake2b512'
| 'blake2s256'
| 'md4'
| 'md5'
| 'ripemd160'
| 'sha1'
| 'sha224'
| 'sha256'
| 'sha384'
| 'sha512'
| 'sha512-224'
| 'sha512-256'
| 'sha3-224'
| 'sha3-256'
| 'sha3-384'
| 'sha3-512'
| 'shake128'
| 'shake256'
type BlobOrStringOrBuffer =
| string
| NodeJS.TypedArray
| ArrayBufferLike
| Blob
type DigestEncoding =
| 'utf8'
| 'ucs2'
| 'utf16le'
| 'latin1'
| 'ascii'
| 'base64'
| 'base64url'
| 'hex'