react-native-aes-crypto
Advanced tools
Comparing version 1.3.7 to 1.3.8
{ | ||
"name": "react-native-aes-crypto", | ||
"version": "1.3.7", | ||
"version": "1.3.8", | ||
"description": "AES crypto native module for react-native", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -19,10 +19,21 @@ # React Native AES | ||
- See [Linking Libraries](http://facebook.github.io/react-native/docs/linking-libraries-ios.html) OR | ||
- Drag RCTAes.xcodeproj to your project on Xcode. | ||
- Click on your main project file (the one that represents the .xcodeproj) select Build Phases and drag libRCTAes.a from the Products folder inside the RCTAes.xcodeproj. | ||
##### Using CocoaPods (React Native 0.60 and higher) | ||
```sh | ||
cd ios | ||
pod install | ||
``` | ||
##### Using React Native Link (React Native 0.59 and lower) | ||
Run `react-native link react-native-aes-crypto` after which you should be able to use this library on iOS. | ||
### Installation (Android) | ||
#### Untested! | ||
##### React Native 0.60 and higher | ||
- Linking is done automatically | ||
##### Using React Native Link (React Native 0.59 and lower) | ||
- In `android/settings.gradle` | ||
```gradle | ||
@@ -56,2 +67,4 @@ ... | ||
new RCTAesPackage(), | ||
// or | ||
// packages.add(new RCTAesPackage()); | ||
...... | ||
@@ -72,3 +85,3 @@ } | ||
const encrypt = (text, key) => { | ||
return Aes.randomKey(32).then(iv => { | ||
return Aes.randomKey(16).then(iv => { | ||
return Aes.encrypt(text, key, iv).then(cipher => ({ | ||
@@ -84,3 +97,3 @@ cipher, | ||
try { | ||
generateKey('Arnold', 'salt', 5000, 512).then(key => { | ||
generateKey('Arnold', 'salt', 5000, 256).then(key => { | ||
console.log('Key:', key) | ||
@@ -87,0 +100,0 @@ encrypt('These violent delights have violent ends', key) |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37962
146