Browse Source

mock keystore updates

pull/1/head
Tim Glasgow 2 years ago
parent
commit
28266d4c44
  1. 20
      squarenotsquare/__mock__/mockKeyStore.js

20
squarenotsquare/__mock__/mockKeyStore.js

@ -1,12 +1,13 @@
export async function removeKey(key) {
class MockKeyStore {
async remove(key) {
return true;
}
export async function setKey(key, value) {
async set(key, value) {
return true;
}
export async function getKey(key) {
async get(key) {
if (key === 'isNull'){
return null;
} else if (key === 'negTest') {
@ -15,3 +16,16 @@ export async function getKey(key) {
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',
}
Loading…
Cancel
Save