hmacSha256 method
HMAC-SHA256
Implementation
String hmacSha256({required String key}) {
if (this.isEmptyOrNull) {
return "";
}
var hmacSha256 = crypto.Hmac(crypto.sha256, utf8.encode(key));
var digest = hmacSha256.convert(utf8.encode(this));
return digest.toString();
}