1 changed files with 28 additions and 14 deletions
@ -1,17 +1,31 @@ |
|||||
export async function removeKey(key) { |
class MockKeyStore { |
||||
return true; |
async remove(key) { |
||||
|
return true; |
||||
|
} |
||||
|
|
||||
|
async set(key, value) { |
||||
|
return true; |
||||
|
} |
||||
|
|
||||
|
async get(key) { |
||||
|
if (key === 'isNull'){ |
||||
|
return null; |
||||
|
} else if (key === 'negTest') { |
||||
|
return '-1'; |
||||
|
} else { |
||||
|
return '1234567890'; |
||||
|
} |
||||
|
} |
||||
} |
} |
||||
|
|
||||
export async function setKey(key, value) { |
export default RNSecureKeyStore = new MockKeyStore(); |
||||
return true; |
|
||||
} |
|
||||
|
|
||||
export async function getKey(key) { |
export const ACCESSIBLE = { |
||||
if (key === 'isNull'){ |
AFTER_FIRST_UNLOCK :'AccessibleAfterFirstUnlock', |
||||
return null; |
AFTER_FIRST_UNLOCK_THIS_DEVICE_ONLY :'AccessibleAfterFirstUnlockThisDeviceOnly', |
||||
} else if (key === 'negTest') { |
ALWAYS : 'AccessibleAlways', |
||||
return '-1'; |
ALWAYS_THIS_DEVICE_ONLY : 'AccessibleAlwaysThisDeviceOnly', |
||||
} else { |
WHEN_PASSCODE_SET_THIS_DEVICE_ONLY :'AccessibleWhenPasscodeSetThisDeviceOnly', |
||||
return '1234567890'; |
WHEN_UNLOCKED : 'AccessibleWhenUnlocked', |
||||
} |
WHEN_UNLOCKED_THIS_DEVICE_ONLY : 'AccessibleWhenUnlockedThisDeviceOnly', |
||||
} |
} |
Loading…
Reference in new issue