The digestStringAsync() method of Crypto generates a digest of the supplied data string with the provided digest algorithm.
A digest is a short fixed-length value derived from some variable-length input. Cryptographic digests should exhibit collision-resistance, meaning that it's very difficult to generate multiple inputs that have equal digest values.
You can specify the returned string format as one of CryptoEncoding. By default the resolved value will be formatted as a HEX string. On web, this method can only be called from a secure origin (https) otherwise an error will be thrown.
Transforms a value into a fixed-size hash (usually shorter than the initial value).
The value that will be used to generate a digest.
Format of the digest string. Defaults to: CryptoDigestOptions.HEX
Resolves into a value representing the hashed input.