Poly1305Sink class
This implementation is derived from the The Poly1305 Algorithms described in the ChaCha20 and Poly1305 for IETF Protocols document.
The Reference implementation used for optimization: https://github.com/floodyberry/poly1305-opt
- Inheritance
-
- Object
- HashDigestSink
- BlockHashSink
- Poly1305Sink
- Implemented types
Constructors
- Poly1305Sink.new(Uint8List key)
- Creates a new instance to process 16-bytes blocks with 17-bytes buffer
Properties
- bdata → ByteData
-
The buffer as ByteData
latefinalinherited
- blockLength → int
-
The internal block length of the algorithm in bytes
finalinherited
- buffer → Uint8List
-
The main buffer
finalinherited
- closed → bool
-
Returns true if the sink is closed, false otherwise
no setterinherited
- derivedKeyLength → int
-
The length of generated key in bytes
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hashLength → int
-
The length of generated hash in bytes
final
- messageLength ↔ int
-
The message length in bytes
getter/setter pairinherited
- messageLengthInBits → int
-
Get the message length in bits
no setterinherited
- pos ↔ int
-
The current position of data in the buffer
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sbuffer → Uint32List
-
The buffer as Uint32List
latefinalinherited
Methods
-
$finalize(
) → Uint8List -
Finalizes the message digest with the remaining message block,
and returns the output as byte array.
override
-
$process(
List< int> chunk, int start, int end) → void -
Processes a chunk of input data
override
-
$update(
[List< int> ? block, int offset = 0, bool last = false]) → void -
Internal method to update the message-digest with a single
block
.override -
add(
List< int> data, [int start = 0, int? end]) → void -
Adds
data
to the message-digest.inherited -
close(
) → void -
Finalizes the message-digest. It calls digest method internally.
inherited
-
digest(
) → HashDigest -
Finalizes the message-digest and returns a HashDigest
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reset(
) → void -
Resets the current state to start from fresh state
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited