PasswordStore class
A SecureStore that stores the private key encrypted with a password.
The password must be entered by the user to ensure the security of the private key and must not be stored anywhere.
- Inheritance
-
- Object
- StarknetStore
- SecureStore
- PasswordStore
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
-
bytesToWords(
Uint8List secret) → List< String> -
Converts a Uint8List to a list of words by decoding it as UTF-8 and
splitting it by spaces.
inherited
-
deletePrivateKey(
{required String id}) → Future< void> -
Deletes the private key identified by
id
. -
deleteSecret(
{required String key}) → Future< void> -
Deletes the secret encrypted with
password
underkey
. -
deleteSeedPhrase(
{required String id}) → Future< void> -
Deletes the seed phrase corresponding to
id
. -
getPrivateKey(
{required String id, required String password}) → Future< Uint8List?> -
Retrieves the private key identified by
id
encrypted withpassword
-
getSecret(
{required String key, required String password}) → Future< Uint8List?> -
Retrieves the secret encrypted with
password
underkey
. -
getSeedPhrase(
{required String id, required String password}) → Future< List< String> ?> -
Retrieves the seed phrase corresponding to
id
encrypted withpassword
. -
hasPassword(
) → Future< bool> -
initiatePassword(
String password) → Future< void> -
isGoodPassword(
String password) → Future< bool> - Check wether this password is the one registered for this app
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
privateKeyOf(
String id) → String -
inherited
-
replacePassword(
String previousPassword, String newPassword) → Future< bool> -
seedPhraseOf(
String id) → String -
inherited
-
storePrivateKey(
{required String password, required String id, required Uint8List privateKey, Uint8List? iv}) → Future< void> -
Stores the
privateKey
identified asid
encrypted withpassword
. If not set, a random generated IV will be used. -
storeSecret(
{required String key, required String password, required Uint8List secret, Uint8List? iv}) → Future< void> -
Stores a
secret
encrypted withpassword
underkey
. Ifiv
is provided, it will be used as the initialization vector. Otherwise, a random one will be generated. -
storeSeedPhrase(
{required String password, required String id, required List< String> seedPhrase, Uint8List? iv}) → Future<void> -
Stores the
seedPhrase
corresponding toid
encrypted withpassword
. Ifiv
is not set, a random generated IV will be used. -
toString(
) → String -
A string representation of this object.
inherited
-
when<
T> ({required FutureOr< T> biometric(BiometricStore), required FutureOr<T> password(PasswordStore)}) → Future<T> -
Uses the
biometric
function if the store is a BiometricStore and thepassword
function if the store is a PasswordStore.inherited -
wordsToBytes(
List< String> words) → Uint8List -
Converts words to Uint8List by concatenating them with a space separator
and encoding them as UTF-8.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited