shake128sum function

String shake128sum(
  1. String input,
  2. int outputSize, [
  3. Encoding? encoding,
  4. bool uppercase = false,
])

Generates a SHAKE-128 checksum in hexadecimal of arbitrary length

Parameters:

  • input is the string to hash
  • outputSize is the length of the output digest in bytes. The hexadecimal string output is twice as that. You can expect a string of length 2 * outputSizeInBytes from this function.
  • The encoding is the encoding to use. Default is input.codeUnits
  • uppercase defines if the hexadecimal output should be in uppercase

Implementation

String shake128sum(
  String input,
  int outputSize, [
  Encoding? encoding,
  bool uppercase = false,
]) {
  return Shake128(outputSize).string(input, encoding).hex(uppercase);
}