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