{"name":"react-native-securerandom","version":"0.2.0","description":"Generate cryptographically-secure random bytes in react native","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"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":"*"},"gitHead":"863f21b22a34fe568a64f9e02779057862aeff4d","bugs":{"url":"https://github.com/rh389/react-native-securerandom/issues"},"_id":"react-native-securerandom@0.2.0","_npmVersion":"5.6.0","_nodeVersion":"9.4.0","_npmUser":{"name":"rh389","email":"roberthogan@blueyonder.co.uk"},"dist":{"integrity":"sha512-2UWEr/3eUJsDFDpqxoZZWpUu2p6In6NPpE8fve8n6ZBUucZS/23WXu6LPv0eqgk+THnQnX4dlk7ggN4JYj8NHg==","shasum":"8df331c3db954d7a02f7152f688a1bf43912e554","tarball":"http://registry-npm.ywwl.com/react-native-securerandom/download/react-native-securerandom-0.2.0.tgz","fileCount":21,"unpackedSize":36430,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbnnmiCRA9TVsSAnZWagAAT5sP/3mXMUQYBMzk5g2AQA+u\nW2/+rZ+oPIICYPmAW/NBZdAVPbRhJSWNoPffG8jywtBuUlkP/q2YEGiyn06q\nnAEGsusfste91UwIMhcUiwRmR3MgUnK5AUfU4Q8tg81DT7XM5TcoJ+frTZ9d\nrgSZVbZpEyHjd2obo5uKvy+/oFe7TAbi9hS4YCAe2Ptbhq/DE/hzRRvuFbTw\nTe+7w190fguYw4cuaGnYAbfEkL5c6a3FNCA8bTpbpIaCMALKhWlBMFbrx+fC\nBZKXqPOktEiBGtz6mOD7w0wcF5YkJk66Bfxt37rSSd63BR9PU8guxSkYnhiS\nYPESrD1g2fhNKg21beLXMTkJC0r694/hhrp8qVML2jtlBblwRNJCElrElcPG\nUL3SDuj99YXxkbjkMyP8+cNfC4WDb6932yA5hMYXOUJczWXjQsBcj8M563kd\nfWuRutYtumqo8KYL8e3YSr5JCuWYezqtBIro9sz5Tupawx93/yHxDClJSpfi\nzu8hBuhK+vLFJp0AiPja5SMzGcJHQYPrybyjlr43CCNvc8SShDZ0BjEciDhM\nmnegQEUpyZBjIkpHSjG6OpojjzLmQOI6uTzQEAAOycB2Hpatva2R29Hots92\nPP+ffsLPC7iXB/bFoxLiswro1oZgTo40kbYyXJ/lIne8RQo6czD1c9+r4txx\nbwiC\r\n=/QhV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDg5e+07jESbDo9x456eCeGgZGTbNImu07yrRyCYTuPRAIhAMxe56b158kzdThzHmCQqVEZyGJ6X0wuQ1M5wPZsv915"}],"size":10198,"noattachment":false,"key":"/react-native-securerandom/-/react-native-securerandom-0.2.0.tgz"},"maintainers":[{"name":"rh389","email":"roberthogan@blueyonder.co.uk"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-securerandom_0.2.0_1537112482018_0.18683553166838185"},"_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":1537112482208,"_cnpm_publish_time":1537112482208,"dist-tags":{"latest":"1.0.1"}}