Hash class abstract
A cryptographic hash algorithm implementation.
The package:webcrypto/webcrypto.dart
library provides the following implementations of this
class:
- Hash.sha1, (this is considered weak, only included for compatibility),
- Hash.sha256,
- Hash.sha384, and,
- Hash.sha512.
For a guidance on choice of hash function see NIST SP 800-57 Part 1 Rev 5.
Notice 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.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
digestBytes(
List< int> data) → Future<Uint8List> -
Compute a cryptographic hash-sum of
data
using this Hash. -
digestStream(
Stream< List< data) → Future<int> >Uint8List> -
Compute a cryptographic hash-sum of
data
stream using this Hash. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent 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.
- sha256 → const Hash
- SHA-256 as specified in FIPS PUB 180-4.
- sha384 → const Hash
- SHA-384 as specified in FIPS PUB 180-4.
- sha512 → const Hash
- SHA-512 as specified in FIPS PUB 180-4.