1.0.1 • Published 5 years ago

@trackforce/react-native-crypto v1.0.1

Weekly downloads
138
License
MIT
Repository
github
Last release
5 years ago

npm version

React Native Crypto

Common encryption/decryption for react-native

Features

  • RSA
  • AES
  • Hmac
  • Pbkdf2
  • Sha

Installation

npm install @trackforce/react-native-crypto

or

yarn add @trackforce/react-native-crypto

Linking Automatically

react-native link

Linking Manually

iOS

  • See Linking Libraries OR
  • Drag RCTCrypto.xcodeproj to your project on Xcode.
  • Click on your main project file (the one that represents the .xcodeproj) select Build Phases and drag libRCTCrypto.a from the Products folder inside the RCTCrypto.xcodeproj.

(Android)

...
include ':@trackforce/react-native-crypto'
project(':@trackforce/react-native-crypto').projectDir = new File(rootProject.projectDir, '../node_modules/@trackforce/react-native-crypto/android')
  • In android/app/build.gradle
...
dependencies {
    ...
    compile project(':@trackforce/react-native-crypto')
}
  • register module (in MainApplication.java)
......
import com.trackforce.aes.RCTCryptoPackage;

......

@Override
protected List<ReactPackage> getPackages() {
   ......
   new RCTCryptoPackage(),
   ......
}

Local development

  1. yarn install
  2. cd demo
  3. yarn install
  4. react-native run-ios

Note: React native doesn't support Symlinks. See Stackoverflow.

Usage

Example

See example App.tsx for usage

methods

See Typescript typings

1.0.1

5 years ago

1.0.0

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.1

6 years ago