React Native Des (remobile)
A des crypto for react-native
Installation
npm install react-native-des --save
Installation (iOS)
- Drag RCTDes.xcodeproj to your project on Xcode.
- Click on your main project file (the one that represents the .xcodeproj) select Build Phases and drag libRCTDes.a from the Products folder inside the RCTDes.xcodeproj.
- Look for Header Search Paths and make sure it contains both $(SRCROOT)/../react-native/React as recursive.
Installation (Android)
...include ':react-native-des'project(':react-native-des').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-des/android/RCTDes')
- In
android/app/build.gradle
...dependencies { ... compile project(':react-native-des')}
- register module (in MainActivity.java)
// <--- import
Usage
Example
var Des = ; Des;
method
encrypt(text, key, callback)
encrypt(base64, key, callback)