Hash class Null safety

A cryptographic hash algorithm implementation.

The package:webcrypto/webcrypto.dart library provides the following implementations of this class:

For a guidance on choice of hash function see NIST SP 800-57 Part 1 Rev 5.

WARNING: Custom implementations of this class cannot be passed to to other methods in this library.

Annotations
  • @sealed

Properties

hashCode int
The hash code for this object.
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

digestBytes(List<int> data) Future<Uint8List>
Compute a cryptographic hash-sum of data using this Hash.
digestStream(Stream<List<int>> data) Future<Uint8List>
Compute a cryptographic hash-sum of data stream using this Hash.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

sha1 → const Hash
SHA-1 as specified in FIPS PUB 180-4.
impl.sha1
sha256 → const Hash
SHA-256 as specified in FIPS PUB 180-4.
impl.sha256
sha384 → const Hash
SHA-384 as specified in FIPS PUB 180-4.
impl.sha384
sha512 → const Hash
SHA-512 as specified in FIPS PUB 180-4.
impl.sha512