CryptoModule class

The CryptoModule class provides a simple interface for encrypting and decrypting data using the AES encryption algorithm. It also includes methods for initializing and managing encryption keys and initialization vectors (IV).

Constructors

CryptoModule()

Properties

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

Methods

check(String key) → void
decryptData(String encryptedData) String
Decrypts the provided encryptedData using the AES encryption algorithm and the generated encryption key. Returns the decrypted data as a string.
encryptData(String data) String
Encrypts the provided data using the AES encryption algorithm and the generated encryption key. Returns the encrypted data as a base64-encoded string.
init() → void
Initializes the CryptoModule by generating and storing a new encryption key and initialization vector (IV) in SimpleSharedPref. It only runs once and is safe to be called on app startup.
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