This may be a string or an object with a single property name
that is a string. The string names the hash function to use. Supported values are:
"SHA-1"
(but don't use this in cryptographic applications)"SHA-256"
"SHA-384"
"SHA-512"
An ArrayBuffer
, a TypedArray
or a DataView
object containing the data to be digested
Generated using TypeDoc
Generates a digest of the given data. A digest is a short fixed-length value derived from some variable-length input. Cryptographic digests should exhibit collision-resistance, meaning that it's hard to come up with two different inputs that have the same digest value.
It takes as its arguments an identifier for the digest algorithm to use and the data to digest. It returns a Promise which will be fulfilled with the digest.
Note that this API does not support streaming input: you must read the entire input into memory before passing it into the digest function.