JSPM

react-native-rncryptor

1.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q45969F
  • License MIT

React Native RNCryptor AES 256 encryption

Package Exports

  • react-native-rncryptor

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-native-rncryptor) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

React Native RNCryptor

It's an easy-to-use library for encrypting data with AES 256 in React Native.

RNCryptor developed popular and easy-to-use AES libs, implementations are available in C, C++, C#, Erlang, Go, Haskell, Java, PHP, Python, Javascript, and Ruby.

The data format includes all the metadata required to securely implement AES encryption, as described in "Properly encrypting with AES with CommonCrypto,". Specifically, it includes:

  • AES-256 encryption
  • CBC mode
  • Password stretching with PBKDF2
  • Password salting
  • Random IV
  • Encrypt-then-hash HMAC

Getting started

$ npm install react-native-rncryptor --save

$ react-native link react-native-rncryptor

Usage

import RNCryptor from 'react-native-rncryptor';

RNCryptor.encrypt('a text', 'password').then((encryptedbase64)=>{
  console.log(encryptedbase64)
}).catch((error)=>{
  console.log(error)
})

RNCryptor.decrypt('encrypted base64', 'password').then((plaintext)=>{
  console.log(plaintext)
}).catch((error)=>{
  console.log(error)
})

License

MIT