encodeByteHmac static method
Creates a hmac from a key
that usually is the derived key, keylen
,
challenge
and hmacLength
.
Implementation
static Uint8List encodeByteHmac(
Uint8List key, int keylen, List<int> challenge,
{hmacLength = 64}) {
var mac = HMac(SHA256Digest(), hmacLength);
mac.init(KeyParameter(key));
mac.update(Uint8List.fromList(challenge), 0, challenge.length);
var out = Uint8List(keylen);
mac.doFinal(out, 0);
return out;
}