taggedHash function

Uint8List taggedHash(
  1. Uint8List data,
  2. String tag
)

Implementation

Uint8List taggedHash(Uint8List data, String tag) {
  final tagDIgits = singleHash(Uint8List.fromList(tag.codeUnits));
  final concat = Uint8List.fromList([...tagDIgits, ...tagDIgits, ...data]);
  return singleHash(concat);
}