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.
 
 
 
 
 

39 lines
1009 B

class MockKeyStore {
async remove(key) {
if (key === 'notakey') {
throw ('Key not found');
}
return true;
}
async set(key, value) {
if (key === 'savefailed'){
throw ('Failed to save key');
}
return true;
}
async get(key) {
if (key === 'isNull'){
return null;
} else if (key === 'negTest') {
return '-1';
} else if (key === 'notakey') {
throw ('Key not found');
} else {
return '1234567890';
}
}
}
export default RNSecureKeyStore = new MockKeyStore();
export const ACCESSIBLE = {
AFTER_FIRST_UNLOCK :'AccessibleAfterFirstUnlock',
AFTER_FIRST_UNLOCK_THIS_DEVICE_ONLY :'AccessibleAfterFirstUnlockThisDeviceOnly',
ALWAYS : 'AccessibleAlways',
ALWAYS_THIS_DEVICE_ONLY : 'AccessibleAlwaysThisDeviceOnly',
WHEN_PASSCODE_SET_THIS_DEVICE_ONLY :'AccessibleWhenPasscodeSetThisDeviceOnly',
WHEN_UNLOCKED : 'AccessibleWhenUnlocked',
WHEN_UNLOCKED_THIS_DEVICE_ONLY : 'AccessibleWhenUnlockedThisDeviceOnly',
}