{"name":"react-native-securerandom","version":"1.0.0-rc.0","description":"Generate cryptographically-secure random bytes in react native","main":"index.js","scripts":{"test":"flow && jest"},"author":{"name":"Rob Hogan","email":"npm@rhogan.net","url":"https://github.com/rh389"},"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":"7b512c84d5291e95f6775870fdb25b7229b80b0d","bugs":{"url":"https://github.com/rh389/react-native-securerandom/issues"},"_id":"react-native-securerandom@1.0.0-rc.0","_npmVersion":"5.6.0","_nodeVersion":"8.10.0","_npmUser":{"name":"rh389","email":"roberthogan@blueyonder.co.uk"},"dist":{"integrity":"sha512-Q0YbjeeCYIc2irtc85RuZB3KkwsIBSqOm58HfNa0UHFtok4h1uCErcdJPid+DwrFQHtSkTBkLcpPibI6S78Wpg==","shasum":"fbbf682dd59fd1651f65e689c9f4fe1a911503f5","tarball":"http://registry-npm.ywwl.com/react-native-securerandom/download/react-native-securerandom-1.0.0-rc.0.tgz","fileCount":29,"unpackedSize":55585,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc9nEbCRA9TVsSAnZWagAAgIcP/0Ck8vSsbX8FBWWGHZ++\nm7bY7rkgReuU5Pa/VrGsnSaHPvgi6sQoIiBf1XjdTuMtf6Btj+Nho1pCzk/d\nH55F2KcKoTWrMQXM4A6WEsPACUEzG7nL05oe3Xue+6mjF9MyINq+ZrmM63wB\n/PEuU7QZlp3Cnl9bAq/8GKSOKp38350CmSWiADRAw3LscN5FxI3wv9ZxGvLY\nkyEOb3aG3Haayc1Ey/XAzP+aj8q+dy2vCa/ZwhXSbJM18Ct6P9M/RHBPUx+V\n51zDgTq2ywdTMRkg1EVVL3SPYA/u+bwwmmLxZtg3UxNhLoHqasqrI2VpmeTD\nMMWyKXdfUU3kuIF9pMmiait/wBDviEyfMdnXRNKz3rbWoCb+BUpfBCM2qlAy\n7MXu5Niix7Z1T2209Ip+WoMt7UsPKkZPV1aUhm4nUKLLznm7f1U/Ja0eNy9/\n3pjqUaK5UPwSd+fTceSBbcVgjIegx9aSt6bvworZml3y5s8iTjadP/6ZfCBe\nDN/zy8N69MBT5BoUYZCJPBH7fQsaBRtDavXYeoolOffl7Z4kdhnCgis+HxYW\n5bAAKDtX+iY1TK+Sm1FwO1Lp2MzvG84eAEqmIdzklFg9KpxRi1A+r3jsorCP\noFYxgH7Gtj+/qMM333DHpmPcX5odphBPizycwRpefrNgxigMq/GwOablnVr4\nwbij\r\n=sKcb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC4C22DCksudVAMPN/ovPDtEFINzCfyiOzaGdV2QtDDNAiARKqcao4bNQiL2oG3OV0KQ3Ww5+TOrrIDW6dB/p9SpfA=="}],"size":16116,"noattachment":false,"key":"/react-native-securerandom/-/react-native-securerandom-1.0.0-rc.0.tgz"},"maintainers":[{"name":"rh389","email":"roberthogan@blueyonder.co.uk"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-securerandom_1.0.0-rc.0_1559654682588_0.26946984291498377"},"_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":1559654682743,"_cnpm_publish_time":1559654682743,"dist-tags":{"latest":"1.0.1"}}