StringCryptor class abstract

Interface for the Plugin

Implementers

Constructors

StringCryptor()

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

decrypt(String data, String key) Future<String?>
Decrypts data created with the encrypt method using a key created with generateRandomKey or generateKeyFromPassword methods. In case the key is wrong or the data has been forged, a MacMismatchException is thrown
encrypt(String string, String key) Future<String?>
Encrypts string using a key generated from generateRandomKey or generateKeyFromPassword. The returned string is a sequence of 3 base64-encoded strings (iv, mac and cipherText) and can be transferred and stored almost anywhere.
generateKeyFromPassword(String password, String salt) Future<String?>
Gets a key from the given password and salt. salt can be generated with generateSalt while password is usually provided by the user.
generateRandomKey() Future<String?>
Generates a random key to use with encrypt and decrypt methods
generateSalt() Future<String?>
Generates a salt to use with generateKeyFromPassword
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