HMAC
Hash-based Message Authentication Code (HMAC) as defined in RFC 2104.
HMAC computes and verifies message authentication codes using a secret key and a Digest algorithm.
val key = provider.get(HMAC).keyGenerator(SHA256).generateKey()
val signature = key.signatureGenerator().generateSignature(data)
key.signatureVerifier().verifySignature(data, signature)Content copied to clipboard
Types
Link copied to clipboard
Link copied to clipboard
An HMAC key that provides MAC computation via signatureGenerator and verification via signatureVerifier.
Properties
Link copied to clipboard
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 keyDecoder(digest: CryptographyAlgorithmId<Digest>): Decoder<HMAC.Key.Format, HMAC.Key>
Returns a Decoder that decodes HMAC keys for the given digest from the specified Key.Format.
Link copied to clipboard
Returns a KeyGenerator that generates HMAC keys for the given digest.