digestAsync

external fun digestAsync(algorithm: Algorithm, data: BufferSource): Promise<ArrayBuffer>(source)
external fun digestAsync(algorithm: String, data: BufferSource): Promise<ArrayBuffer>(source)

The digest() method of the SubtleCrypto interface generates a digest of the given data, using the specified hash function. 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.

MDN Reference