{"_id":"uncrypto","_rev":"2977822","name":"uncrypto","description":"Single API for Web Crypto API and Crypto Subtle working in Node.js, Browsers and other runtimes","dist-tags":{"latest":"0.1.3"},"maintainers":[{"name":"pi0","email":"pooya@pi0.ir"}],"time":{"modified":"2023-06-21T13:20:19.000Z","created":"2023-02-06T20:26:38.473Z","0.1.3":"2023-06-06T20:31:02.475Z","0.1.2":"2023-02-06T20:36:35.306Z","0.1.1":"2023-02-06T20:30:32.900Z","0.1.0":"2023-02-06T20:26:38.473Z"},"users":{},"repository":{"type":"git","url":"git+https://github.com/unjs/uncrypto.git"},"versions":{"0.1.3":{"name":"uncrypto","version":"0.1.3","description":"Single API for Web Crypto API and Crypto Subtle working in Node.js, Browsers and other runtimes","repository":{"type":"git","url":"git+https://github.com/unjs/uncrypto.git"},"license":"MIT","sideEffects":false,"type":"module","exports":{".":{"browser":"./dist/crypto.web.mjs","bun":"./dist/crypto.web.mjs","deno":"./dist/crypto.web.mjs","edge-light":"./dist/crypto.web.mjs","edge-routine":"./dist/crypto.web.mjs","lagon":"./dist/crypto.web.mjs","netlify":"./dist/crypto.web.mjs","react-native":"./dist/crypto.web.mjs","wintercg":"./dist/crypto.web.mjs","worker":"./dist/crypto.web.mjs","workerd":"./dist/crypto.web.mjs","node":{"require":"./dist/crypto.node.cjs","import":"./dist/crypto.node.mjs","types":"./dist/crypto.node.d.ts"},"require":"./dist/crypto.web.cjs","import":"./dist/crypto.web.mjs","types":"./dist/crypto.web.d.ts"}},"main":"./dist/crypto.node.cjs","module":"./dist/crypto.web.mjs","browser":"./dist/crypto.web.mjs","types":"./dist/crypto.web.d.ts","scripts":{"build":"unbuild","dev":"vitest dev","lint":"eslint --cache --ext .ts,.js,.mjs,.cjs . && prettier -c src test","lint:fix":"eslint --cache --ext .ts,.js,.mjs,.cjs . --fix && prettier -c src test -w","prepack":"pnpm run build","release":"pnpm test && changelogen --release && npm publish && git push --follow-tags","test":"pnpm lint && vitest run --coverage"},"devDependencies":{"@types/node":"^20.2.5","@vitest/coverage-v8":"^0.32.0","changelogen":"^0.5.3","eslint":"^8.42.0","eslint-config-unjs":"^0.2.1","prettier":"^2.8.8","typescript":"^5.1.3","unbuild":"^1.2.1","vitest":"^0.32.0"},"packageManager":"pnpm@8.6.1","gitHead":"a0cd466151b2b728a54b085c931c7173fdecc26b","bugs":{"url":"https://github.com/unjs/uncrypto/issues"},"homepage":"https://github.com/unjs/uncrypto#readme","_id":"uncrypto@0.1.3","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"shasum":"e1288d609226f2d02d8d69ee861fa20d8348ef2b","size":2913,"noattachment":false,"key":"/uncrypto/-/uncrypto-0.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/uncrypto/download/uncrypto-0.1.3.tgz"},"_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"directories":{},"maintainers":[{"name":"pi0","email":"pooya@pi0.ir"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uncrypto_0.1.3_1686083462304_0.953964428802738"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-06-06T20:31:02.475Z","publish_time":1686083462475,"_source_registry_name":"default","_cnpm_publish_time":1686083462475},"0.1.2":{"name":"uncrypto","version":"0.1.2","description":"Single API for Web Crypto API and Crypto Subtle working in Node.js, Browsers and other runtimes","repository":{"type":"git","url":"git+https://github.com/unjs/uncrypto.git"},"license":"MIT","sideEffects":false,"type":"module","exports":{".":{"node":{"require":"./dist/crypto.node.cjs","import":"./dist/crypto.node.mjs","types":"./dist/crypto.node.d.ts"},"require":"./dist/crypto.web.cjs","import":"./dist/crypto.web.mjs","types":"./dist/crypto.web.d.ts"}},"main":"./dist/crypto.node.cjs","module":"./dist/crypto.web.mjs","browser":"./dist/crypto.web.mjs","types":"./dist/crypto.web.d.ts","scripts":{"build":"unbuild","dev":"vitest dev","lint":"eslint --cache --ext .ts,.js,.mjs,.cjs . && prettier -c src test","lint:fix":"eslint --cache --ext .ts,.js,.mjs,.cjs . --fix && prettier -c src test -w","prepack":"pnpm run build","release":"pnpm test && changelogen --release && npm publish && git push --follow-tags","test":"pnpm lint && vitest run --coverage"},"devDependencies":{"@types/node":"^18.11.19","@vitest/coverage-c8":"^0.28.3","changelogen":"^0.4.1","eslint":"^8.33.0","eslint-config-unjs":"^0.1.0","prettier":"^2.8.3","typescript":"^4.9.5","unbuild":"^1.1.1","vitest":"^0.28.3"},"packageManager":"pnpm@7.26.2","gitHead":"8642dd396497410d2fe5bd27834e4c4ffa9315ce","bugs":{"url":"https://github.com/unjs/uncrypto/issues"},"homepage":"https://github.com/unjs/uncrypto#readme","_id":"uncrypto@0.1.2","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"shasum":"225aa7d41a13e4ad07ed837aedfa975a93afa924","size":2738,"noattachment":false,"key":"/uncrypto/-/uncrypto-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/uncrypto/download/uncrypto-0.1.2.tgz"},"_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"directories":{},"maintainers":[{"name":"pi0","email":"pooya@pi0.ir"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uncrypto_0.1.2_1675715795140_0.36549003900022625"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-02-06T20:36:35.306Z","publish_time":1675715795306,"_cnpm_publish_time":1675715795306},"0.1.1":{"name":"uncrypto","version":"0.1.1","description":"Single API for Web Crypto API and Crypto Subtle working in Node.js, Browsers and other runtimes","repository":{"type":"git","url":"git+https://github.com/unjs/uncrypto.git"},"license":"MIT","sideEffects":false,"type":"module","exports":{".":{"require":"./dist/crypto.web.cjs","import":"./dist/crypto.web.mjs","types":"./dist/crypto.web.d.ts","node":{"require":"./dist/crypto.node.cjs","import":"./dist/crypto.node.mjs","types":"./dist/crypto.node.d.ts"}}},"main":"./dist/crypto.node.cjs","module":"./dist/crypto.web.cjs","browser":"./dist/crypto.web.cjs","types":"./dist/crypto.web.d.ts","scripts":{"build":"unbuild","dev":"vitest dev","lint":"eslint --cache --ext .ts,.js,.mjs,.cjs . && prettier -c src test","lint:fix":"eslint --cache --ext .ts,.js,.mjs,.cjs . --fix && prettier -c src test -w","prepack":"pnpm run build","release":"pnpm test && changelogen --release && npm publish && git push --follow-tags","test":"pnpm lint && vitest run --coverage"},"devDependencies":{"@types/node":"^18.11.19","@vitest/coverage-c8":"^0.28.3","changelogen":"^0.4.1","eslint":"^8.33.0","eslint-config-unjs":"^0.1.0","prettier":"^2.8.3","typescript":"^4.9.5","unbuild":"^1.1.1","vitest":"^0.28.3"},"packageManager":"pnpm@7.26.2","gitHead":"74571c0571e9f3ad211ce75b93cd46cf155ac74c","bugs":{"url":"https://github.com/unjs/uncrypto/issues"},"homepage":"https://github.com/unjs/uncrypto#readme","_id":"uncrypto@0.1.1","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"shasum":"33326fbfb5b6eeddf985c5543df476962de38a61","size":2738,"noattachment":false,"key":"/uncrypto/-/uncrypto-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/uncrypto/download/uncrypto-0.1.1.tgz"},"_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"directories":{},"maintainers":[{"name":"pi0","email":"pooya@pi0.ir"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uncrypto_0.1.1_1675715432724_0.24469378187618074"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-02-06T20:30:32.900Z","publish_time":1675715432900,"_cnpm_publish_time":1675715432900},"0.1.0":{"name":"uncrypto","version":"0.1.0","description":"Single API for Web Crypto API and Crypto Subtle working in Node.js, Browsers and other runtimes","repository":{"type":"git","url":"git+https://github.com/unjs/uncrypto.git"},"license":"MIT","sideEffects":false,"type":"module","exports":{".":{"require":"./dist/crypto.web.cjs","import":"./dist/crypto.web.mjs","types":"./dist/crypto.web.d.ts","node":{"require":"./dist/crypto.node.cjs","import":"./dist/crypto.node.mjs","types":"./dist/crypto.node.d.ts"}}},"types":"./dist/crypto.web.d.ts","scripts":{"build":"unbuild","dev":"vitest dev","lint":"eslint --cache --ext .ts,.js,.mjs,.cjs . && prettier -c src test","lint:fix":"eslint --cache --ext .ts,.js,.mjs,.cjs . --fix && prettier -c src test -w","prepack":"pnpm run build","release":"pnpm test && changelogen --release && npm publish && git push --follow-tags","test":"pnpm lint && vitest run --coverage"},"devDependencies":{"@types/node":"^18.11.19","@vitest/coverage-c8":"^0.28.3","changelogen":"^0.4.1","eslint":"^8.33.0","eslint-config-unjs":"^0.1.0","prettier":"^2.8.3","typescript":"^4.9.5","unbuild":"^1.1.1","vitest":"^0.28.3"},"packageManager":"pnpm@7.26.2","bugs":{"url":"https://github.com/unjs/uncrypto/issues"},"homepage":"https://github.com/unjs/uncrypto#readme","_id":"uncrypto@0.1.0","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"shasum":"cc7d268b7f3197fccb0d0d4cb29f549f9102f254","size":2720,"noattachment":false,"key":"/uncrypto/-/uncrypto-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/uncrypto/download/uncrypto-0.1.0.tgz"},"_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"directories":{},"maintainers":[{"name":"pi0","email":"pooya@pi0.ir"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uncrypto_0.1.0_1675715198333_0.12297272753188104"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-02-06T20:26:38.473Z","publish_time":1675715198473,"_cnpm_publish_time":1675715198473}},"readme":"# uncrypto\n\n[![npm version][npm-version-src]][npm-version-href]\n[![npm downloads][npm-downloads-src]][npm-downloads-href]\n[![Github Actions][github-actions-src]][github-actions-href]\n[![Codecov][codecov-src]][codecov-href]\n\nThis library provides a single api to use [web-crypto](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API) and [Subtle Crypto](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto) in both Node.js using [Crypto Module](https://nodejs.org/api/crypto.html#crypto) and Web targets using [Web Crypto API](https://nodejs.org/api/crypto.html#crypto) using [Conditional Exports](https://nodejs.org/api/packages.html#conditional-exports).\n\n**Requirements:**\n\n- **Node.js**: Version **15 and above** (this library provides no polyfills for older versions!)\n- **Browser**: [Secure Context](https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts) (HTTPS/Localhost) in [Supported Browsers](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto#browser_compatibility)\n- **Other Runtimes:** Exposed `globalThis.crypto` and `globalThis.crypto.subtle`. (you can polyfill if neeeded)\n\n## Usage\n\nInstall package:\n\n```sh\n# npm\nnpm install uncrypto\n\n# yarn\nyarn add uncrypto\n\n# pnpm\npnpm install uncrypto\n```\n\nImport:\n\n```js\n// ESM\nimport { subtle, randomUUID, getRandomValues } from \"uncrypto\";\n\n// CommonJS\nconst { subtle, randomUUID, getRandomValues } = require(\"uncrypto\");\n```\n\n## Development\n\n- Clone this repository\n- Install latest LTS version of [Node.js](https://nodejs.org/en/)\n- Enable [Corepack](https://github.com/nodejs/corepack) using `corepack enable`\n- Install dependencies using `pnpm install`\n- Run interactive tests using `pnpm dev`\n\n## License\n\nMade with ????\n\nPublished under [MIT License](./LICENSE).\n\n<!-- Badges -->\n\n[npm-version-src]: https://img.shields.io/npm/v/uncrypto?style=flat-square\n[npm-version-href]: https://npmjs.com/package/uncrypto\n[npm-downloads-src]: https://img.shields.io/npm/dm/uncrypto?style=flat-square\n[npm-downloads-href]: https://npmjs.com/package/uncrypto\n[github-actions-src]: https://img.shields.io/github/workflow/status/unjs/uncrypto/ci/main?style=flat-square\n[github-actions-href]: https://github.com/unjs/uncrypto/actions?query=workflow%3Aci\n[codecov-src]: https://img.shields.io/codecov/c/gh/unjs/uncrypto/main?style=flat-square\n[codecov-href]: https://codecov.io/gh/unjs/uncrypto\n","_attachments":{},"homepage":"https://github.com/unjs/uncrypto#readme","bugs":{"url":"https://github.com/unjs/uncrypto/issues"},"license":"MIT"}