digest method

String digest(
  1. String message
)

Implementation

String digest(String message) {
  var binKey = hex.decode(_key!);
  var dataBytes = Utf8Encoder().convert(message);
  var hmacBytes = Hmac(sha256, binKey).convert(dataBytes).bytes;
  return hex.encode(hmacBytes).toLowerCase();
}