String getHash(String str) { var key = utf8.encode(partner!.partnerKey); var bytes = utf8.encode(str); var digest = crypto.Hmac(crypto.sha256, key).convert(bytes); var hash = digest.toString(); return hash; }