{"bugs":{"url":"https://github.com/expo/expo/issues"},"dist":{"shasum":"c8544cd2f9f377d2089313591ea3da192b1cf13c","tarball":"https://registry.npmjs.org/expo-random/-/expo-random-7.0.0-rc.0.tgz","fileCount":27,"integrity":"sha512-hEAiGQ/dJoSX6ABzj8n2nVrHxAHR8qAb0z6uzAsLLoudzhotQ+D8kSsXpFrl0rZJjrVaNWQwjwtUpa7BunhE+w==","signatures":[{"sig":"MEQCIGE7RhW/iEs5XSsD+ij/CBNyZ/lIupilJiO3GbYynj4RAiAhMqbxMJeBrEeAcF7c3gsX/LPzlTjq+t1Ot0c5HI4RSw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17203,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdfJovCRA9TVsSAnZWagAATkgQAIIEVgXCcQ/nMNWU46Px\nJ/itb+gSgHTZ1Iy1hk1pN0K+2S/JpKdz3mhukHpSI6Ay363HM63hNabJ1tXE\nI4qaKsvQzaBvpGJ1qejolrdrfGxbEdsT4gcOj2UtUKy6cP9YjYeJlwOlr1sS\n5EqBKm7buLt7N+BYqjGLeX55y8UBoKLUKcYlWLhLcfY1Nw/raPpPVgn6AutI\ndtyqdiwLs58pEIPLsN+cF98Y8QY6OrWEFYHYwzaaAbvvbutuVZsfdXTng9ol\nHenhKQT6dUSrr0kG/yKBTmM+AdqBvjTrK1cJOxlI3VxeBqXD4jv08af+vTxW\nykoLhNNDH1oeXavZs0/GEFT90nxXlR0ovp33qHx6nmNdME46o9lprrV7wvW9\nxmgx6K5muru6Yk5HZ+mzrbvAbzD17i09aofpvpP0KWum03+K6GWsUe5LCDcB\nEwHo9GE/uIrb2+Rznz9Ee1isdFkDOloCGbgz+3w8PSXVxcAB+jd683fTL7ta\nL+c1Av0p48RX8q5tWpJllQLG6DbIh9oqNknNKo+EUUDBgb9nrlT3GqFs75S/\nci2YF2bRVONruq/p7VsX4wSUMukuty5uINYi/3rSfkVpgCzDAX/BHHl5mlR0\n21vupERlcAxzFShz8IEYtnZ6BVfQ0N4VibTixzXGJT0SYrTzdstrVJHC3w+y\nccET\r\n=/nZh\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"expo-module-scripts/universal"},"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# Documentation\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":"5d4fcf318390f59cecd1ae5d191afb15488a4447","license":"MIT","scripts":{"lint":"expo-module lint","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","directory":"packages/expo-random"},"description":"Expo universal module for random bytes","directories":{},"maintainers":[{"name":"bbarthec","email":"bartlomiejbukowski.b@gmail.com"},{"name":"brentvatne","email":"brentvatne@gmail.com"},{"name":"ccheever","email":"ccheever@gmail.com"},{"name":"charliecruzan","email":"charliecruzan@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":"mczernek","email":"czernekmichal@gmail.com"},{"name":"quinlanj","email":"quinlanjung@gmail.com"},{"name":"sjchmiela","email":"sjchmiela@gmail.com"},{"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.1.1-rc.0"},"_npmOperationalInternal":{"tmp":"tmp/expo-random_7.0.0-rc.0_1568447023195_0.5753553354337242","host":"s3://npm-registry-packages"},"unimodulePeerDependencies":{"@unimodules/core":"*"},"_id":"expo-random@7.0.0-rc.0","version":"7.0.0-rc.0"}