3 changed files with 12 additions and 1 deletions
+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
*