use custom key to encript mmkv storage
This commit is contained in:
parent
c9f4ca1197
commit
f1d5df41e1
|
@ -5,7 +5,7 @@ export class MMKVLoader {
|
||||||
|
|
||||||
setProcessingMode = jest.fn().mockImplementation(() => ({
|
setProcessingMode = jest.fn().mockImplementation(() => ({
|
||||||
withEncryption: jest.fn().mockImplementation(() => ({
|
withEncryption: jest.fn().mockImplementation(() => ({
|
||||||
initialize: jest.fn().mockImplementation(() => {})
|
encryptWithCustomKey: jest.fn().mockImplementation(() => ({ initialize: jest.fn().mockImplementation(() => {}) }))
|
||||||
}))
|
}))
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ const MMKV = new MMKVLoader()
|
||||||
// MODES.MULTI_PROCESS = ACCESSIBLE BY APP GROUP (iOS)
|
// MODES.MULTI_PROCESS = ACCESSIBLE BY APP GROUP (iOS)
|
||||||
.setProcessingMode(ProcessingModes.MULTI_PROCESS)
|
.setProcessingMode(ProcessingModes.MULTI_PROCESS)
|
||||||
.withEncryption()
|
.withEncryption()
|
||||||
|
.encryptWithCustomKey('rocket-chat') // JUST A TEST KEY
|
||||||
.initialize();
|
.initialize();
|
||||||
|
|
||||||
export const useUserPreferences = create(MMKV);
|
export const useUserPreferences = create(MMKV);
|
||||||
|
|
Loading…
Reference in New Issue