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)
Inherited Attributes
attributeInherited Attributes from Mac: algorithm, hashAlgorithm
Inherited Properties
propertyInherited Properties 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.
Inherited Methods
methodInherited Methods from Mac: doFinal, getInstance, init, reset, toString, update, verify
methodInherited Methods from Object: deepCopy, fromJson, hash, toDict, toJson, toMap, toString, toXml