1.0.2 • Published 2 years ago
react-native-zebra-aes-crypto v1.0.2
React Native Zebra AES
AES encryption/decryption for react-native
Installation
npm install --save react-native-zebra-aes-cryptoor
yarn add react-native-zebra-aes-cryptoInstallation (iOS)
Using CocoaPods (React Native 0.60 and higher)
cd ios
pod installUsing React Native Link (React Native 0.59 and lower)
Run react-native link react-native-zebra-aes-crypto after which you should be able to use this library on iOS.
Installation (Android)
React Native 0.60 and higher
- Linking is done automatically
 
Using React Native Link (React Native 0.59 and lower)
- In 
android/settings.gradle 
...
include ':react-native-zebra-aes-crypto'
project(':react-native-zebra-aes-crypto').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-zebra-aes-crypto/android')- In 
android/app/build.gradle 
...
dependencies {
    ...
    compile project(':react-native-zebra-aes-crypto')
}- register module (in MainApplication.java)
 
......
import com.zebraelectronics.rnp.aes.RCTAesPackage;
......
@Override
protected List<ReactPackage> getPackages() {
   ......
   new RCTAesPackage(),
   // or
   // packages.add(new RCTAesPackage());
   ......
}Usage
methods
encrypt(dataBase64, keyBase64) => base64decrypt(dataBase64, keyBase64) => base64