Key class
Represents an Encryption Key.
Constructors
- Key(Uint8List bytes)
- Creates an Encryption Key object from a Uint8List.
- Key.allZerosOfLength(int length)
- Creates an Encryption Key object of ALL ZEROS from a length. The key is ALL ZEROS - NOT CRYPTOGRAPHICALLY SECURE!
- Key.fromBase16(String encoded)
- Creates an Encryption Key object from a hexdecimal string.
- Key.fromBase64(String encoded)
- Creates an Encryption Key object from a Base64 string.
- Key.fromLength(int length)
-
Creates an Encryption Key object from a length.
The key is filled with
length
bytes generated by a Random.secure() generator - Key.fromSecureRandom(int length)
-
Creates an Encryption Key object from a length.
The key is filled with
length
bytes generated by a Random.secure() generator - Key.fromUtf8(String input)
- Creates an Encryption Key object from a UTF-8 string.
Properties
- base16 → String
-
Gets the Encrypted bytes as a Hexdecimal representation.
no setterinherited
- base64 → String
-
Gets the Encrypted bytes as a Base64 representation.
no setterinherited
- bytes → Uint8List
-
Gets the Encrypted bytes.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- length → int
-
no setter
- 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
-
stretch(
int desiredKeyLength, {int iterationCount = 100, Uint8List? salt}) → Key -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited