update method

  1. @override
Hash update(
  1. List<int> data
)
override

Updates the MD4 hash with the provided input data.

This method updates the MD4 hash by processing the input data. If the hash computation is already finished, it will throw a StateError.

Parameters:

  • data: The input data to be included in the hash computation.

Returns:

  • The updated MD4 hash object.

Implementation

@override
Hash update(List<int> data) {
  if (_finished) {
    throw const MessageException(
        "SHA512: can't update because hash was finished.");
  }
  _lengthInBytes += data.length;
  _buffer.addAll(BytesUtils.toBytes(data));
  _iterate();
  return this;
}