stream method
The stream
method is used for generating a stream of pseudorandom bytes from the SHAKE (Secure Hash Algorithm KEccak) hash function.
If the SHAKE instance has not been finalized, this method ensures that the sponge construction is properly padded and permuted before extracting data.
Parameters:
dst
: AList<int>
to store the generated pseudorandom bytes.
This method is especially useful for producing variable-length output streams, which is a key feature of SHAKE.
Implementation
void stream(List<int> dst) {
if (!_finished) {
_padAndPermute(0x1f);
}
_squeeze(dst);
}