Digest

Cryptographic hash (message digest) algorithm.

Digest algorithms compute a fixed-size hash value from arbitrary input data. Concrete algorithms are available as top-level CryptographyAlgorithmId objects (e.g., SHA256, SHA512, SHA3_256).

val digest = provider.get(SHA256).hasher().hash(data)

For keyed hash-based message authentication, see HMAC.

Properties

Link copied to clipboard
abstract override val id: CryptographyAlgorithmId<Digest>

The typed identifier that uniquely distinguishes this algorithm and is used to look it up from a CryptographyProvider.

Functions

Link copied to clipboard
abstract fun hasher(): Hasher

Returns a Hasher that computes digests using this algorithm.