Sea class

The SEA class used to encrypt and decrypt data.

Every method of this class is static.

Errors

If an error occurs, the method returns null. \ The last error is stored in the err property.

final encrypted = Sea.encrypt('Hello World', 'password');
if (encrypted == null) {
 print(Sea.err);
}

Constructors

Sea()

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

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

Static Properties

err String?
The error message if the any Sea function failed.
no setter

Static Methods

decrypt(Object data, KeyPair pair) Future<Object?>
Decrypt the data with the pair.
decryptWithKey(Object data, String key) Future<Object?>
Decrypt the data with a key.
encrypt(Object data, KeyPair pair) Future<String?>
Encrypt the data with the pair.
encryptWithKey(Object data, String key) Future<String?>
Encrypt the data with a key.
pair() Future<KeyPair>
Generate a new key pair.
secret(String data, KeyPair pair) Future<String?>
Create a secret between data (pub key) and pair.
sign(Object data, KeyPair pair) Future<String?>
Sign the data with the pair.
verify(Object data, KeyPair pair) Future<Object?>
Verify the data with the pair.
work(Object data, Object salt, {Algorithm? algorithm, Encoding? encoding}) Future<String?>
Gives a Proof of Work by hasshing the data provided.