{"name":"expo-random","version":"6.0.0-rc.0","keywords":["react-native","expo","random","crypto","random-bytes","secure","generator","bytes"],"author":{"name":"650 Industries, Inc."},"license":"MIT","_id":"expo-random@6.0.0-rc.0","homepage":"https://github.com/expo/expo/tree/master/packages/expo-random","bugs":{"url":"https://github.com/expo/expo/issues"},"dist":{"shasum":"4b08c600737488b3b9d202069373f2a27d0aadca","tarball":"http://registry-npm.ywwl.com/expo-random/download/expo-random-6.0.0-rc.0.tgz","fileCount":24,"integrity":"sha512-QgAnFkno4hwqKxvbQe7wlwMadSpmquNtZD9X5TaXgfLEBelBo1wNyIVMO1fE6Pp4IrEzioEM+DpxHz1zj0uwqw==","signatures":[{"sig":"MEQCIH2Hc9zDPh6w3kmvrJUz+ISH1g51No7J1VdGJNhJuDPcAiBXiNLtEjD//02rO+oHle5ZdNUtgU5QFTXxaVRwSN7MZw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15859,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJ1kiCRA9TVsSAnZWagAAGqMQAKLux7knAIUYcq8lUNC1\nC+tnATvwleKqu/or/QnDsnT66BGeNMh/i+/rbY/mnxdCW3LJQD0k0Nn8hBBc\nIWrbcOPH3RA6fDf9anbh1Ofu1Yx2XS0LXIFug92EThvYpf7mQxMJpPMslcNK\n4fMT7poNDgdE9y61yEg1qmD3pVsKq4Sh0u4KPOQIikbf6ToohKZOgXcmMNnZ\nRTPx4x2I5K4sCEpUR8dDxdj8eOmByAZ1dNpABlZXYgY7y66LC22qdMfCudev\nLyVk390GClL/JleLh1EsmKM0IzT0VzkyqtZtSDjBcWHynzKPHRL1zlHoT8qz\nYitL38b7/V5HABzbWeWuiwYaIyZGl/xpTMPnb+oAGog+UZnmKQXJm3BsfYPQ\n+pi+71Q/pZh25HmejGLnpacacmZmHtetRdpeXbUDHQE0rUgAOLjbGBoIfN2G\nHr16g6pNt0XZETbSc4AEos4eHFSdKLQkERBDGo1PHsh75eVPI43STmPil9iW\n90DtTdBU5Fj3JKcyJxYiccS3SE3JEUcrJw70YXW56yotc3mPvan90tl+NLRt\nu68Yc/O2VSxmFLohrEUHRKFrAAxXOtqx6UhAT9kp01Hoj+JrQ3Bt88aBjdnC\n6slCuzQOp0q5GispCJSyVV0volQTP/VgCsZLX7x3CjMFv4V9G8u01OBZybH4\nl0xJ\r\n=W3So\r\n-----END PGP SIGNATURE-----\r\n","size":5685,"noattachment":false,"key":"/expo-random/-/expo-random-6.0.0-rc.0.tgz"},"jest":{"preset":"expo-module-scripts"},"main":"build/Random.js","_from":"file:expo-random-6.0.0-rc.0.tgz","types":"build/Random.d.ts","gitHead":"6334f82adccb529e9347e348c874bd8f6a92cacc","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"},"_resolved":"","_integrity":"","repository":{"url":"git+https://github.com/expo/expo.git","type":"git"},"_npmVersion":"6.1.0","description":"Expo universal module for random bytes","directories":{},"sideEffects":false,"_nodeVersion":"11.6.0","dependencies":{"base64-js":"^1.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"expo-module-scripts":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/expo-random_6.0.0-rc.0_1562859809773_0.03157516672236649","host":"s3://npm-registry-packages"},"unimodulePeerDependencies":{"@unimodules/core":"*"},"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","publish_time":1562859809970,"maintainers":[{"email":"radoslaw.krzemien@swmansion.com","name":"radoslawkrzemien"},{"email":"piotrek.szeremeta@swmansion.com","name":"pkham"},{"email":"szymon.dziedzic@swmansion.com","name":"szdziedzic"},{"email":"npm@tsapeta.com","name":"tsapeta"},{"email":"ide+npm@jameside.com","name":"ide"},{"email":"kosmatylukasz@gmail.com","name":"lukmccall"},{"email":"beto@expo.io","name":"betoatexpo"},{"email":"phil@kitten.sh","name":"philpl"},{"email":"brent+expobotnpm@expo.io","name":"expo-bot"},{"email":"hughesno1@gmail.com","name":"alanhughes"},{"email":"hellokadi@gmail.com","name":"kadikraman"},{"email":"mikucki@gmail.com","name":"aleqsio"},{"email":"mwlawlor@gmail.com","name":"marklawlor"},{"email":"donadeldev@gmail.com","name":"gabrieldonadel"},{"email":"gosimek@gmail.com","name":"simek"},{"email":"keith@expo.io","name":"keith-kurak"},{"email":"chris@christopherwalter.com","name":"christopherwalter"},{"email":"datwheat@gmail.com","name":"fiber-god"},{"email":"brentvatne@gmail.com","name":"brentvatne"},{"email":"baconbrix@gmail.com","name":"evanbacon"},{"email":"quinlanjung@gmail.com","name":"quinlanj"},{"email":"support@expo.io","name":"expoadmin"},{"email":"exponent.team@gmail.com","name":"exponent"},{"email":"wschurman@gmail.com","name":"wschurman"},{"email":"me@bycedric.com","name":"bycedric"},{"email":"sampjon@gmail.com","name":"jonsamp"},{"email":"mhampton@hey.com","name":"princefleaswallow"},{"email":"ckchien@gmail.com","name":"kudochien"}],"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.","_cnpm_publish_time":1562859809970,"dist-tags":{"canary":"0.0.1-canary-20240418-8d74597","latest":"14.0.1","sdk-50":"13.6.0","sdk-51":"14.0.1"}}