{"name":"react-native-securerandom","version":"0.3.0","description":"Generate cryptographically-secure random bytes in react native","main":"index.js","scripts":{"test":"flow && jest"},"author":{"name":"Rob Hogan","email":"roberthogan@blueyonder.co.uk"},"license":"MIT","peerDependencies":{"react-native":"*"},"repository":{"type":"git","url":"git+https://github.com/rh389/react-native-securerandom.git"},"keywords":["react-native","SecRandomCopyBytes","PRNG","CSPRNG","SecureRandom","crypto","RandomNumberGenerator","Cryptography"],"homepage":"https://github.com/rh389/react-native-securerandom#readme","dependencies":{"base64-js":"*"},"devDependencies":{"@babel/core":"^7.1.2","@babel/preset-env":"^7.1.0","babel-core":"^7.0.0-bridge.0","babel-jest":"^23.6.0","flow-bin":"^0.78.0","jest":"^23.6.0","react-native":"^0.57.2"},"gitHead":"a8b6170397551678ed9fa764f61dc8fb436a44b7","bugs":{"url":"https://github.com/rh389/react-native-securerandom/issues"},"_id":"react-native-securerandom@0.3.0","_npmVersion":"5.6.0","_nodeVersion":"9.4.0","_npmUser":{"name":"rh389","email":"roberthogan@blueyonder.co.uk"},"dist":{"integrity":"sha512-Le2jxjt2NLseebfZANo3uf2nnyBvb7KrFqlhCoFFlQkovtJM9u+/e+tpzrS9TGmP116zkk/xJSxttZ5psaQ1pQ==","shasum":"4b85c39eb1babc8cd662c7174d96eb149486fae1","tarball":"http://registry-npm.ywwl.com/react-native-securerandom/download/react-native-securerandom-0.3.0.tgz","fileCount":26,"unpackedSize":40564,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbuQMZCRA9TVsSAnZWagAAJcQP+wXLvBRKdN/JD3Wu5hE+\nuJqpNnzQIRcf0HOb/2j7lGOvIlyp0zRYPmfcmI5AsgakKqMKPdZZ7k0p9Wby\n07xQcJtD0ucGdAUZ3AAshhtDOTxKOLYZle+LSGhJalNQhx2pKDcSLmmBpoYk\nSLxHgz2EhS0sKKXfI5clmPY1EsUIuoLC54XnvZ/6jInPmJCtYZlsTPnrd/Ow\nYDxF+o28006YPBmJ+6Q/ReJBaEF+DHiLxfT89opl5JWvU5kFNuF3+HbVRsQp\nXelUKIjTlWW4m+nDmNxJn2ui+e2PVGyCXsGFIWJi0gBCb76TT5qOlVnusH2P\np2d2I04Z2xc3/KS3cN09ywG/Zh+s19fwZ2YbmFYM/I8rx1E7eZGAC90jUZf7\nnSZdS+MNeDAt1cAfejxAQkdLDw7yPy68M6OOTuePNypsbxbGgqhMBkyqiaUu\nwAlZRm6mwqjMybeTQ+8jvHfb1mF0fSNj5Pme+HH+MCRVNYigWaB2d7/cGR+L\ntwP9EWAA/W2pOXPkwESbvjK6O/G6krzgaKz77pXz3hoaXEhu0LMBZ6WqKpds\nr0yndFybIqIsTyjj0lkDNWv7BjfQ/5r8iWXjL7mAmt+iHmQGlidE89nSqnAS\no7omn3wZd1QXkH039EVEHQzOZUwMftJawc+iRT6d+OYdTBF2dGtvIIaB7fuG\n2k/a\r\n=TGo2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGR50SlP6JF6P/+85X2K0sTui0alXeOv4Stn/vrmM4HHAiEA4bgh2F9fOiTjWenJxKTx5yu978Lq/0Yh87TfO6N9lSY="}],"size":11704,"noattachment":false,"key":"/react-native-securerandom/-/react-native-securerandom-0.3.0.tgz"},"maintainers":[{"name":"rh389","email":"roberthogan@blueyonder.co.uk"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-securerandom_0.3.0_1538851608527_0.6222887556188628"},"_hasShrinkwrap":false,"readme":"# react-native-securerandom\n[![npm version](https://badge.fury.io/js/react-native-securerandom.svg)](https://badge.fury.io/js/react-native-securerandom)\n\nA library to generate cryptographically-secure random bytes. Uses `SecRandomCopyBytes` on iOS, `SecureRandom` on Android and `System.Security.Cryptography.RandomNumberGenerator` on Windows.\n\n## Usage\nThe library exports a single function:\n### generateSecureRandom(length: number) => Promise\\<Uint8Array\\>\nTakes a length, the number of bytes to generate, and returns a `Promise` that resolves with a `Uint8Array`.\n\n```javascript\nimport { generateSecureRandom } from 'react-native-securerandom';\n\ngenerateSecureRandom(12).then(randomBytes => console.log(randomBytes));\n```\n\n## Installation\n\n`$ yarn add react-native-securerandom`\n\n### Automatic linking with react-native link\n\n`$ react-native link react-native-securerandom`\n\n### Manual linking\n\n#### iOS\n\n##### With Cocoapods\n1. Add `pod 'RNSecureRandom', :path => '../node_modules/react-native-securerandom'` to your `Podfile` (changing your `node_modules` path as appropriate)\n2. Run `pod install` from the same directory as your `Podfile`\n\n##### Without Cocoapods\n1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`\n2. Go to `node_modules` ➜ `react-native-securerandom` and add `RNSecureRandom.xcodeproj`\n3. In XCode, in the project navigator, select your project. Add `libRNSecureRandom.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`\n\n#### Android\n\n1. Open up `android/app/src/main/java/[...]/MainActivity.java`\n  - Add `import net.rhogan.rnsecurerandom.RNSecureRandomPackage;` to the imports at the top of the file\n  - Add `new RNSecureRandomPackage()` to the list returned by the `getPackages()` method\n2. Append the following lines to `android/settings.gradle`:\n  \t```\n  \tinclude ':react-native-securerandom'\n  \tproject(':react-native-securerandom').projectDir = new File(rootProject.projectDir, \t'../node_modules/react-native-securerandom/android')\n  \t```\n3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:\n  \t```\n      compile project(':react-native-securerandom')\n  \t```\n\n#### Windows\n\nSee [react-native-windows](https://github.com/Microsoft/react-native-windows)\n\n1. In Visual Studio add `node_modules/react-native-securerandom/windows/RNSecureRandom.sln` folder to your solution, and reference from your app.\n2. Open up your app's `MainPage.cs`\n  - Add `using Net.Rhogan.RNSecureRandom.RNSecureRandom;` to the usings at the top of the file\n  - Add `new RNSecureRandomPackage()` to the `List<IReactPackage>` returned by the `Packages` method\n","publish_time":1538851608687,"_cnpm_publish_time":1538851608687,"dist-tags":{"latest":"1.0.1"}}