MD5 class
A class that represents the MD5 hash algorithm, which is used to compute MD5 message digests. This class implements the SerializableHash interface.
The MD5 algorithm produces a 128-bit (16-byte) message digest of input data.
Example usage:
final md5 = MD5();
md5.update(List<int>.from('Hello, world!'.codeUnits));
final digest = md5.digest();
md5.clean(); // Clean up resources after use.
- Implemented types
Constructors
- MD5()
- Creates a new MD5 instance.
Properties
- getBlockSize → int
-
The block size used by the hash algorithm.
no setteroverride
- getDigestLength → int
-
The length of the digest produced by the hash algorithm.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clean(
) → void -
Clean up the internal state and reset hash object to its initial state.
override
-
cleanSavedState(
SH1State savedState) → void -
Clean up and reset the saved state of the hash object to its initial state.
This function erases the buffer and sets the state and length to the default values.
It is used to ensure that a previously saved hash state is cleared and ready for reuse.
override
-
digest(
) → List< int> -
Generates the final hash digest by assembling and returning the hash state in a List
override
-
finish(
List< int> out) → Hash -
Finalizes the hash computation and stores the hash state in the provided List
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reset(
) → Hash -
Resets the hash computation to its initial state.
override
-
restoreState(
SH1State savedState) → SerializableHash< HashState> -
Restores the hash computation state from a previously saved state.
override
-
saveState(
) → SH1State -
Saves the current hash computation state into a serializable state object.
override
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
List< int> data) → Hash -
Updates the hash computation with the given data.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited