HashBase<T extends HashDigestSink> class abstract

The base class used by the hash algorithm implementations. It implements the StreamTransformer and exposes few convenient methods to handle any types of data source.

Implemented types
Available extensions

Constructors

HashBase.new()
const

Properties

hashCode int
The hash code for this object.
no setterinherited
name String
The name of this algorithm
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

bind(Stream<List<int>> stream) Stream<HashDigest>
Transforms the byte array input stream to generate a new stream which contains a single HashDigest
override
byteStream(Stream<int> stream, [int bufferSize = 1024]) Future<HashDigest>
Consumes the entire stream of byte array and generates a HashDigest.
cast<RS, RT>() StreamTransformer<RS, RT>
Provides a StreamTransformer<RS, RT> view of this stream transformer.
override
convert(List<int> input) HashDigest
Process the byte array input and returns a HashDigest.
createSink() → T
Create a HashDigestSink for generating message-digests
file(dynamic input, [int start = 0, int? end]) Future<HashDigest>

Available on HashBase<HashDigestSink>, provided by the HashBaseFileSupport extension

Converts the input file and returns a HashDigest asynchronously.
fileSync(dynamic input, {int start = 0, int? end, int bufferSize = 2048}) HashDigest

Available on HashBase<HashDigestSink>, provided by the HashBaseFileSupport extension

Converts the input file and returns a HashDigest synchronously.
hex(List<int> input) String
Process the byte array input and returns a hash in hexadecimal.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
string(String input, [Encoding? encoding]) HashDigest
Process the input string and returns a HashDigest.
stringStraem(Stream<String> stream, [Encoding? encoding]) Future<HashDigest>
Consumes the entire stream of string and generates a HashDigest.
toString() String
A string representation of this object.
inherited

Operators

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