Dart API Referencedart:cryptoHash

Hash Interface

Interface for cryptographic hash functions.

The update method is used to add data to the hash. The digest method is used to extract the message digest.

Once the digest method has been called no more data can be added using the update method. If update is called after the first call to digest a HashException is thrown.

If multiple instances of a given Hash is needed the newInstance method can provide a new instance.

Subinterfaces

MD5, SHA1, SHA256

Methods

Code int get blockSize() #

Block size of the hash in bytes.

int get blockSize();

Code List<int> digest() #

Finish the hash computation and extract the message digest as a list of bytes.

List<int> digest();

Code Hash newInstance() #

Returns a new instance of this hash function.

Hash newInstance();

Code Hash update(List<int> data) #

Add a list of bytes to the hash computation.

Hash update(List<int> data);