KeysHelper class
Allows to easily generate new keys either to be used with AES or RSA key.
Constructors
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
-
generateAesKey(
{int length = 256}) → Future< Uint8List> -
Generates a new AES key having the desired
length
. -
generateEcKeyPair(
{String? type}) → Future< CommercioKeyPair< CommercioECPublicKey, CommercioECPrivateKey> > - Generates a new random EC key pair.
-
generateRandomNonce(
int length, {int bit = 256}) → Uint8List - Generate a random nonce
-
generateRsaKeyPair(
{required CommercioRSAKeyType keyType, int bytes = 2048}) → Future< CommercioKeyPair< CommercioRSAPublicKey, CommercioRSAPrivateKey> > -
Generates a new RSA key pair having the given
bytes
length. If no length is specified, the default is going to be 2048.