klyn.cryptography.Hmac.Hmac
constructor

    public Hmac(hash as Object) throws CryptoException:

Description

Creates an HMAC bound to the given digest algorithm.

Parameters

- hash Digest algorithm instance, for example `SHA512()` or `SHA3_256()`.

Throws

- CryptoException when the digest algorithm is unsupported. ```klyn import klyn.cryptography mac = Hmac(SHA3_256()) print(mac.hashAlgorithm) ```