
Security News
Open Source CAI Framework Handles Pen Testing Tasks up to 3,600× Faster Than Humans
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
redux-persist-encrypted-storage
Advanced tools
Redux Persist storage for React Native Encrypted Storage
Well known and trusted React Native Encrypted Storage based redux-persist Storage Engine.
This library is using the well known and trusted React Native Encrypted Storage
library under the hood to store your data in a secure way. According to the developers, react native encrypted storage uses a wrapper around Android's EncryptedSharedPreferences
and iOS' Keychain
and developed with the support for TypeScript.
Ensure to install the react-native-encrypted-storage
library as a dependency. Check the installation guide.
And also install the redux-persist-encrypted-storage
library.
yarn add redux-persist-encrypted-storage
# or
npm install --save redux-persist-encrypted-storage
redux-persist
global storage engine:import createSecuredStorage from "redux-persist-encrypted-storage";
import { createStore } from "redux";
import { persistStore, persistCombineReducers } from "redux-persist";
import reducers from "./reducers";
// Secured storage
const secureStorage = createSecuredStorage();
const config = {
key: "encrypted",
secureStorage
};
const reducer = persistCombineReducers(config, reducers);
function configureStore() {
// ...
const store = createStore(reducer);
const persistor = persistStore(store);
return { persistor, store };
}
import createSecuredStorage from "redux-persist-encrypted-storage";
import { combineReducers } from "redux";
import { persistReducer } from "redux-persist";
import AsyncStorage from "@react-native-async-storage/async-storage";
import { mainReducers, securedReducers } from "./reducers";
// Secure storage configurations
const secureStorage = createSecuredStorage();
const securePersistConfig = {
key: "secure",
storage: secureStorage
};
// Non-secure storage configurations
const mainPersistConfig = {
key: "main",
storage: AsyncStorage
};
// Combine both reducers into one root reducer
const rootReducer = combineReducers({
insecure: persistReducer(mainPersistConfig, mainReducers),
secure: persistReducer(securePersistConfig, secureReducers)
});
function configureStore() {
let store = createStore(rootReducer);
let persistor = persistStore(store);
return { persistor, store };
}
Keys for the Encrypted Storage only support [A-Za-z0-9.-_]
, meaning all other characters are replaced by an internal replacer
function (defaults to _
).
Inspired by redux-persist-expo-securestore.
FAQs
Redux Persist storage for React Native Encrypted Storage
We found that redux-persist-encrypted-storage demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.