shake128sum function
Generates a SHAKE-128 checksum in hexadecimal of arbitrary length
Parameters:
input
is the string to hashoutputSize
is the length of the output digest in bytes. The hexadecimal string output is twice as that. You can expect a string of length2 * outputSizeInBytes
from this function.- The
encoding
is the encoding to use. Default isinput.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);
}