LightCrypt class

This class is for encrypting and decrypting using various stream ciphers.

This version of LightCrypt is encoded, meaning that it expects keys and IVs to be base64, and returns base64 encoded Strings. Plaintext should be UTF-8. For more flexibility, LightCryptRaw is recommended.

Constructors

LightCrypt({required StreamAlgo algo, required String key})
Construct encryption machine using key and algorithm.

Properties

algorithm StreamAlgo
Get name of this LightCrypt's algorithm.
no setter
hashCode int
The hash code for this object.
no setterinherited
key String
Get this LightCrypt's key.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

decrypt({required String enc, required String iv}) String
Decrypt (with iv) and return original String.
encrypt({required String inp, required String iv}) String
Encrypt (with iv) and return in base 64.
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