shake256sum function
Generates a SHAKE-256 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 shake256sum(
String input,
int outputSize, [
Encoding? encoding,
bool uppercase = false,
]) {
return Shake256(outputSize).string(input, encoding).hex(uppercase);
}