4 changed files with 13 additions and 2 deletions
+1 -1
View File
@@ -218,7 +218,7 @@ This is an update including breaking changes for some environments.
In this version `Math.random()` has been replaced by the random methods of the native crypto module.
For this reason CryptoJS might not run in some JavaScript environments without native crypto module. Such as IE 10 or before or React Native.
For this reason CryptoJS might does not run in some JavaScript environments without native crypto module. Such as IE 10 or before or React Native.
### 3.3.0
+2 -1
View File
@@ -19,7 +19,8 @@ module.exports = {
'repository': null,
'keywords': null,
'main': null,
'dependencies': null
'dependencies': null,
'optionalDependencies': null
}
},
bower: {
+3
View File
@@ -34,6 +34,9 @@
"load-grunt-config": "^0.16.0",
"lodash": "^4.17.11"
},
"optionalDependencies": {
"react-native-crypto": "^2.2.0"
},
"keywords": [
"security",
"crypto",
+7
View File
@@ -29,6 +29,13 @@ var CryptoJS = CryptoJS || (function (Math, undefined) {
} catch (err) {}
}
// React native crypto import via require (React Native)
if (!crypto && typeof require === 'function') {
try {
crypto = require('react-native-crypto');
} catch (err) {}
}
/*
* Cryptographically secure pseudorandom number generator
*