XorCodec class

Allows light protection of bytes by XOR-ing them with another byte array (secret).

When no secret is specified, the codec is just a pass-through (identity codec).

Inheritance

Constructors

XorCodec(dynamic secret)

Properties

decoder Converter<List<int>, List<int>>
Returns the decoder of this, converting from T to S.
no setteroverride
encoder Converter<List<int>, List<int>>
Returns the encoder from S to T.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
inverted Codec<List<int>, List<int>>
Inverts this.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

decode(List<int> encoded) List<int>
Decodes encoded data.
inherited
encode(List<int> input) List<int>
Encodes input.
inherited
fuse<R>(Codec<List<int>, R> other) Codec<List<int>, R>
Fuses this with other.
inherited
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