Hmac
classin packageklyn.cryptography
public class Hmac extends Mac:
└ Mac
└ Hmac
HMAC implementation parameterized by a concrete message digest.
import klyn.cryptography

mac = Hmac(SHA256())
mac.init("secret")
print(mac.doFinal("hello").hex)
Attributes inherited from Mac: algorithm, hashAlgorithm
Properties inherited from Object: type
Constructors
Modifier and Type Member Description
public Hmac Creates an HMAC using `SHA256`.
public Hmac
Hmac(hash as Object) throws CryptoException:
Creates an HMAC bound to the given digest algorithm.
Methods inherited from Mac: doFinal, getInstance, init, reset, toString, update, verify
Methods inherited from Object: fromJson, toDict, toJson, toString, toXml