hmac method
A factory used by Hmac.
Implementation
@override
Hmac hmac(HashAlgorithm hashAlgorithm) {
if (hashAlgorithm is DartSha1) {
return const DartHmac(DartSha1());
}
if (hashAlgorithm is DartSha256) {
return const DartHmac(DartSha256());
}
if (hashAlgorithm is DartSha384) {
return const DartHmac(DartSha384());
}
if (hashAlgorithm is DartSha512) {
return const DartHmac(DartSha512());
}
return DartHmac(hashAlgorithm);
}