You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
738 B
38 lines
738 B
enum SecretStoreKey { moneroWalletPassword, pinCodePassword, backupPassword }
|
|
|
|
const moneroWalletPassword = "MONERO_WALLET_PASSWORD";
|
|
const pinCodePassword = "PIN_CODE_PASSWORD";
|
|
const backupPassword = "BACKUP_CODE_PASSWORD";
|
|
|
|
String generateStoreKeyFor({
|
|
SecretStoreKey key,
|
|
String walletName = "",
|
|
}) {
|
|
var _key = "";
|
|
|
|
switch (key) {
|
|
case SecretStoreKey.moneroWalletPassword:
|
|
{
|
|
_key = moneroWalletPassword + "_" + walletName.toUpperCase();
|
|
}
|
|
break;
|
|
|
|
case SecretStoreKey.pinCodePassword:
|
|
{
|
|
_key = pinCodePassword;
|
|
}
|
|
break;
|
|
|
|
case SecretStoreKey.backupPassword:
|
|
{
|
|
_key = backupPassword;
|
|
}
|
|
break;
|
|
|
|
default:
|
|
{}
|
|
}
|
|
|
|
return _key;
|
|
}
|