{"bugs":{"url":"https://github.com/expo/expo/issues"},"dist":{"shasum":"273b45d858d0e0e4fdcaca97c5401f2c406a9478","tarball":"https://registry.npmjs.org/expo-random/-/expo-random-5.0.0-rc.0.tgz","fileCount":24,"integrity":"sha512-bVAFAdXr4+wxERUm0DlKLEFwQCg1UJu5mHjx4OVoZpqPIjGBwrtAlP/jA9nbqozbM/cYGYHUKB5MCfFqLEriTg==","signatures":[{"sig":"MEQCICSHtN0bN0eQ1RVb+UiBZoriUK8REPUKILoGg9RT3SZTAiBzGm2/m8oX+rObElxPXtLpnTBIHUsr0GF4uc3jzZGkiQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15966,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc0X0UCRA9TVsSAnZWagAARuYP/jB8eFzGXV5GA31QsgCb\n3HxuQqHd5PsTk/gyeuhbGmO5n7s2JwW83yDUaHmqqzRTpy7Ykm/Za0IDf+at\n9M/ynK83NZ7U2qWM6ta7siMoXvADNLxFUJkwkMDLKt2IkvrRH0FOx9cXF2vC\nvPnDKMXPtc0brVDQD0k6pIQbXMd8K58R1pTuMZQxVagMs+FnWaCvGkdcWaV9\ncf8EEQIBBKVpX+cMN79FBkFrAFDY5KlvjuhCxkJjeRsBUMl/yDLwerkIAWm+\nvAaMoRSr1Xmo0yfn4ESFRo0ftmQONqdPC8aXpUqiIz7n7NRBzFdKQSnoUQcs\n5cgOcDaByH6QIFYk/g4jptdUM0O2tgpmMlh2V5M+rHZ3U8Jy0yB8jcvejFbw\nSuqD0p2JLFf9kT6cb7+RYLmwwhABaLKg6SI3wW9TNFvVaECDkyIHq2b0KLeG\nR9W4dNn8fXyoAxgbbwDcKUoyi4uUnWQwXsbRmAqYlkwUsWZ6iILyFJCtfoMX\ny8HqzpaDfnNviyiGea25HUS6AB5NuDoxS7TQ02oJRMR16LfdX9DomF/R0Ue9\nFrZnN1pEFBlGTW5wtUAtBo5WYFsI829InEhVYSB3YUe8CDhaeC2P7VMIkpQ4\n2TICMpRaHo2WaG4/W8sTNUHouPwOmZ5jTfXccSspUAp1hqvmxLsMZjr7B7US\nfOM1\r\n=nqAN\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"expo-module-scripts"},"main":"build/Random.js","name":"expo-random","types":"build/Random.d.ts","author":{"name":"650 Industries, Inc."},"readme":"# expo-random\n\nProvides a native interface for creating strong random bytes. With `Random` you can create values equivalent to `Node.js` core `crypto.randomBytes` API.\n\n# Installation\n\nThis package is pre-installed in [managed](https://docs.expo.io/versions/latest/introduction/managed-vs-bare/) Expo projects as of SDK 33. You may skip the rest of the installation guide if this applies to you.\n\nFor bare React Native projects, you must ensure that you have [installed and configured the `react-native-unimodules` package](https://github.com/unimodules/react-native-unimodules) before continuing.\n\n### Add the package to your npm dependencies\n\n```\nnpm install expo-random\n```\n\n### Configure for iOS\n\nRun `pod install` in the ios directory after installing the npm package.\n\n### Configure for Android\n\nNo additional set up necessary.\n\n# Docoumentation\n\n```js\n// in managed apps:\nimport { Random } from 'expo';\n\n// in bare apps:\nimport * as Random from 'expo-random';\n```\n\n## Methods\n\n### `getRandomBytesAsync`\n\n```js\ngetRandomBytesAsync(byteCount: number): Promise<Uint8Array>\n```\n\nGenerates completely random bytes using native implementations. The `byteCount` property is a `number` indicating the number of bytes to generate in the form of a `Uint8Array`.\n\n**Parameters**\n\n| Name      | Type     | Description                                                                     |\n| --------- | -------- | ------------------------------------------------------------------------------- |\n| byteCount | `number` | A number within the range: **0...1024**. Anything else will throw a `TypeError` |\n\n**Returns**\n\n| Name        | Type                  | Description                                                      |\n| ----------- | --------------------- | ---------------------------------------------------------------- |\n| randomBytes | `Promise<Uint8Array>` | An array of random bytes with the same length as the `byteCount` |\n\n**Example**\n\n```js\nconst randomBytes = await Random.getRandomBytesAsync(3);\n```\n\n# Usage\n\n```javascript\nimport React from 'react';\nimport { View } from 'react-native';\nimport * as Random from 'expo-random';\n\nexport default class DemoView extends React.Component {\n  async componentDidMount() {\n    const randomBytes = await Random.getRandomBytesAsync(16);\n\n    /* Some crypto operation... */\n  }\n  render() {\n    return <View />;\n  }\n}\n```\n","gitHead":"211a7a3ce4007e7aa10ccf6efac4b5333ec31d0a","license":"MIT","scripts":{"test":"expo-module test","build":"expo-module build","clean":"expo-module clean","prepare":"expo-module prepare","expo-module":"expo-module","prepublishOnly":"expo-module prepublishOnly"},"_npmUser":{"name":"tsapeta","email":"sapeta.tomasz@gmail.com"},"homepage":"https://github.com/expo/expo/tree/master/packages/expo-random","keywords":["react-native","expo","random","crypto","random-bytes","secure","generator","bytes"],"deprecated":"This package is now deprecated in favor of expo-crypto, which provides the same functionality. To migrate, replace all imports from expo-random with imports from expo-crypto.","repository":{"url":"https://github.com/expo/expo.git","type":"git"},"description":"Expo universal module for random bytes","directories":{},"maintainers":[{"name":"barthec","email":"bartlomiejbukowski.b@gmail.com"},{"name":"brentvatne","email":"brentvatne@gmail.com"},{"name":"ccheever","email":"ccheever@gmail.com"},{"name":"dsokal","email":"dominiksokal@gmail.com"},{"name":"esamelson","email":"eric@expo.io"},{"name":"evanbacon","email":"baconbrix@gmail.com"},{"name":"expoadmin","email":"support@expo.io"},{"name":"fson","email":"ville.immonen@iki.fi"},{"name":"ide","email":"ide+npm@jameside.com"},{"name":"janicduplessis","email":"janicduplessis@gmail.com"},{"name":"jesseruder","email":"jesseruder@gmail.com"},{"name":"nikki93","email":"s.nikhilesh@gmail.com"},{"name":"quinlanj","email":"quinlanjung@gmail.com"},{"name":"schestakov","email":"sergei332@gmail.com"},{"name":"sjchmiela","email":"sjchmiela@gmail.com"},{"name":"terribleben","email":"ben@exp.host"},{"name":"tsapeta","email":"sapeta.tomasz@gmail.com"},{"name":"wkozyra","email":"wojciech.kozyra@swmansion.com"}],"sideEffects":false,"dependencies":{"base64-js":"^1.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"expo-module-scripts":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/expo-random_5.0.0-rc.0_1557232915487_0.9636930989998269","host":"s3://npm-registry-packages"},"unimodulePeerDependencies":{"@unimodules/core":"*"},"_id":"expo-random@5.0.0-rc.0","version":"5.0.0-rc.0"}