{"name":"react-native-securerandom","version":"0.3.1","description":"Generate cryptographically-secure random bytes in react native","main":"index.js","scripts":{"test":"flow && jest"},"author":{"name":"Rob Hogan","email":"npm@rhogan.net"},"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/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.1.0","babel-jest":"^24.8.0","flow-bin":"^0.78.0","jest":"^24.8.0","react-native":"^0.57.2"},"jest":{"transform":{"^.+\\.js$":"<rootDir>/jest.babel.js"}},"gitHead":"de9ea10e2aef74c8206b129655d94c99b2f2d1b6","bugs":{"url":"https://github.com/rh389/react-native-securerandom/issues"},"_id":"react-native-securerandom@0.3.1","_npmVersion":"5.6.0","_nodeVersion":"8.10.0","_npmUser":{"name":"rh389","email":"roberthogan@blueyonder.co.uk"},"dist":{"integrity":"sha512-fHjjo+VJs5rhIEQwuJIh/x8E7CX1DOAfPI8XuaPwLr1Hq1B9U5hIcPo/tg27c5m9eAqqrsTKk//r9IhZrYuzWg==","shasum":"dc4d5e5cf624e30877996fe3f1a249d6b43c4a50","tarball":"http://registry-npm.ywwl.com/react-native-securerandom/download/react-native-securerandom-0.3.1.tgz","fileCount":28,"unpackedSize":52079,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc9mkiCRA9TVsSAnZWagAAQ6gP/2gQQ4ZeuHVrl0kTWb2+\nIlJQKRlp0lb+O6D7BnNVm0a9vn8h0XzbY+54q9fG/YHjPBx9jfaGsm8PRUoo\n8t6Qkg+x0MxHmxWuIHYSNbVr6INDkmoLylG2rUG4tJKqP34SOLS+lQE9+vGX\nVFI683ELP5EYpxK6iZb5FPgKXDXQ7Jksl+I1V6sNS/btj4sV1LA7MvdMo91R\nPdIYgAZd6EBlzAaIqjObGOK7/S+Ps+Fbiqh4XL4M/Z0mrrbYrSoqtkzHEZqM\n1aBXDP5k9/jO6+JuZ3hGkrd334HMdq1vO45IZ85APyZPiN4DnnasRkqYrnrQ\nHqZosjNjK6+Cd5BqIilCtuBOA6+4uGCWQYnmfYtNCnao5eV6E9vwHs2xyA5f\nHb1TP/oHp4OgMmc2asnYmDnXUlIKtUL22o97OgDewPh8ND+bA1dncm8TRsvP\nmFgMubGoEoTU+b1kNcliK12aHsNu1XjioLRuEwT3xtT/iM/RvubDEun6bt+u\nID+vmdwiZTCcCNzGuJufxeUwoTQJP76B11N3b2XdpXoEuNqfkEKzlMdfpd3X\nFyUthpE+n5ri4d0p8RwJ2OddK4cagYTR2bd0qov5HA8jBUoIDVoAnMxf1JEk\nmQcr7mY/uMf3DtePs3NN92fRhnUeo5T2nvbO+iM/uVEHpcWOwFlySBbfoWPL\nvWFh\r\n=SK9+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHnJm30UELH6qXZqVP2M8Q7Ji5g9d59XWG8qP+dSxJcpAiATDp2p9nSG6otVikm7WRMTi5dbrvRXVEi3HupRRLeVyg=="}],"size":15085,"noattachment":false,"key":"/react-native-securerandom/-/react-native-securerandom-0.3.1.tgz"},"maintainers":[{"name":"rh389","email":"roberthogan@blueyonder.co.uk"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-securerandom_0.3.1_1559652641822_0.4079564598029606"},"_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":1559652641912,"_cnpm_publish_time":1559652641912,"dist-tags":{"latest":"1.0.1"}}