DartCipherState class abstract
Base class for stream cipher states that XOR key stream bytes with input bytes.
Constructors
- DartCipherState({required Cipher cipher})
Properties
- block → Uint8List
-
no setter
- blockAsUint32List → Uint32List
-
no setter
- cipher → Cipher
-
The cipher used by this state.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- keyStreamIndex ↔ int
-
getter/setter pair
- mac → Mac
-
MAC.
no setter
- macSink → MacSink
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
beforeClose(
) → List< int> -
Called before
close
. -
beforeData(
{required SecretKeyData secretKey, required List< int> nonce, List<int> aad = const []}) → void - Called before data is added.
-
convert(
List< int> input, {Uint8List? possibleBuffer, Mac? expectedMac, int? chunkSize}) → Future<List< int> > -
Adds
input
to the sequence of converted bytes and finishes converting all bytes. -
convertChunkSync(
List< int> input, {Uint8List? possibleBuffer}) → List<int> -
Adds
input
to the sequence of converted bytes. Returns a list of converted bytes, which may be empty or larger the input. -
convertSync(
List< int> input, {Uint8List? possibleBuffer, Mac? expectedMac}) → List<int> -
deriveKeySync(
{required SecretKeyData secretKey, required List< int> nonce}) → SecretKeyData -
deriveNonce(
{required SecretKeyData secretKey, required List< int> nonce}) → List<int> -
initialize(
{required bool isEncrypting, required SecretKey secretKey, required List< int> nonce, List<int> aad = const [], int keyStreamIndex = 0}) → Future<void> -
Initializes the state with the given
secretKey
,nonce
, andaad
. -
initializeSync(
{required bool isEncrypting, required SecretKey secretKey, required List< int> nonce, List<int> aad = const [], int keyStreamIndex = 0}) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setBlock(
int blockIndex) → void - Fills block with a new key stream block.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- defaultChunkSize → const int
- Default chunk size for convert / convertSync.