grAdvHMACHashBytes function

List<int> grAdvHMACHashBytes(
  1. List<GRCryptoTypeHMAC> types,
  2. String input,
  3. String key
)

Implementation

List<int> grAdvHMACHashBytes(
    List<GRCryptoTypeHMAC> types, String input, String key) {
  if (types.isEmpty) {
    return [];
  }
  var output = input;
  for (int i = 0; i < types.length; i++) {
    if (i == types.length - 1) {
      return grHMACHashBytes(types[i], output, key);
    }
    output = grHMACHashString(types[i], output, key);
  }
  return [];
}