# rn_encrypted_storage

> A react native package to securely store data locally, it adds to [AsyncStorage](http://www.github.com/BLemine) an **encryption** layer based on [AES](https://searchsecurity.techtarget.com/definition/Advanced-Encryption-Standard) and [Hmacsha1](https://do

Latest version **1.0.4** (published 2021-03-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install rn_encrypted_storage
pnpm add rn_encrypted_storage
yarn add rn_encrypted_storage
bun add rn_encrypted_storage
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2021-03-22 |
| First published | 2021-03-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 201 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Lemine |
| Maintainers | sherlock_lemine |
| Keywords | encryption, AES, Hmacsha1, React-Native |

## Links

- npm: https://www.npmjs.com/package/rn_encrypted_storage
- Homepage: https://github.com/BLemine/rn-encrypted-storage
- npm.io page: https://npm.io/package/rn_encrypted_storage

## Alternatives

- [@gemini-wallet/core](https://npm.io/package/@gemini-wallet/core.md) — 515.6K weekly downloads
- [utility](https://npm.io/package/utility.md) — 416.6K weekly downloads
- [@primno/dpapi](https://npm.io/package/@primno/dpapi.md) — 7.2K weekly downloads
- [pi-readseek](https://npm.io/package/pi-readseek.md) — 3.7K weekly downloads
- [@emilia-protocol/verify](https://npm.io/package/@emilia-protocol/verify.md) — 1.1K weekly downloads

## Recent versions

- 1.0.4 (latest) — 2021-03-22
- 1.0.3 — 2021-03-22
- 1.0.2 — 2021-03-22
- 1.0.1 — 2021-03-22
- 1.0.0 — 2021-03-21
- 0.0.1 — 2021-03-21

## README

### RN-Encrypted-Storage : 
A react native package to securely store data locally, it adds to [AsyncStorage](http://www.github.com/BLemine) an **encryption** layer based on [AES](https://searchsecurity.techtarget.com/definition/Advanced-Encryption-Standard) and [Hmacsha1](https://docs.microsoft.com/fr-fr/dotnet/api/system.security.cryptography.hmacsha1?view=net-5.0) encryption algorithms, your data is now saved 100% **encrypted**.

### Installation : 
```shell
npm install rn_encrypted_storage
# or 
yarn add rn_encrypted_storage

## Install the peer-dependencies if your npm is between v3 and v7: 
npm i @react-native-async-storage/async-storage hmacsha1 react-native-device-info react-native-crypto-js
# or with 
yarn add @react-native-async-storage/async-storage hmacsha1 react-native-device-info react-native-crypto-js
```

### Usage : 

```js
import {encyptStorage,decryptStorage, removeEncryptStorage} from "rn_encrypted_storage";

...

const storeData=async(loggedUser)=>{
 await encryptStorage("name",loggedUser); // you don't need to stringify the object
}

...

const getData=()=>{
  decryptStorage("name").then(res=>{
    console.log(res) // this is your securely stored object, this retures it stringify so you can do :
    console.log(JSON.parse(res)) // if it's a json object
  }).catch(ex=>console.log(ex))
}

...

const remoteData=async ()=>{
  await remoteEncryptStorage("user");
}


```


### Example
For example check the folder [Example](https://github.com/BLemine/rn-encrypted-storage/blob/master/example/index.js)

---
_Source: https://npm.io/package/rn_encrypted_storage · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
