{"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":{"integrity":"sha512-PyKzi7RQBsXKe7VQGReX9Bemz69P159vNOkLnnfyEm9h788BHrc2hpsFJiHzv84QWMuNGOFlDHKKJMZCtK0Zrw==","shasum":"cc7d268b7f3197fccb0d0d4cb29f549f9102f254","tarball":"http://registry-npm.ywwl.com/uncrypto/download/uncrypto-0.1.0.tgz","fileCount":9,"unpackedSize":7085,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCSIOxD92hGcayg7fS1isKb1XSnSXEfhUPDGpnfug1c/wIhAO0P0/U23YjmrAEGx+avjwztcO3JFXXWL+bR5DOpG+Ys"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj4WJ+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo4Gw//W1W9HFrGZtgV4j4kRqpKrXQhMmu80Dlduumq7YKry84v76Ff\r\nqz0n+0PAMk8He4k6X4Bu0EBwc++zebwk/9DoNpZkh5nKIvDgb7l6ZxkC+nOD\r\n6TqyEA+E1KOwXffjzZM3VZ09S4Pp+EiKQ0C/JYoGxmH4Qj6W/q9LAI1PLE1P\r\n7gDlMSgxAqRb+iHkA465//4Omc9oPqBLqAXzVsMC0wJWCKkAjEFgaBQjtY8Z\r\neS2lIZYgELpTXQ3KTWGBvvSArlwdPj30nNw++SYvmRdMNbMJC3Wc0Kk1ZJKy\r\nNfGfIi4Ktkm4ZyYkvvnRpkqevfNMCc1r2ivy8+mEV2NmRIOcxaRiba1A+GBi\r\nDziRAWw9mtOgs6yAKJoTRkLgZwSQbS0+/0FLBKYe/Kz08JC43pWoD7lhHyjv\r\n3gYsTPD2Dv4VWmCDyQOme6+iO0Yv0si0OiyEzK9jn1MH1t07lDjytV8pmA5a\r\nL7rZ+ewWotJ/nCN8doyxZohNHHbPDw3BkLBGccwne7DlfQ0qt3kzCzc4+lVs\r\nq2uObN/KYZhZ/7Ao4Jx/94Lijhx2v089qKbWf36j898jbU58FgCmNbFYAqUn\r\nch2GzVJnQi1b+oMFccBvUBPO4ngGWXrE+7R5ZGFqpq94t48PthxPN3AutZfL\r\nFtS82c3UDOOycyz0AwP0kggUzBe05jIUc9M=\r\n=+XXX\r\n-----END PGP SIGNATURE-----\r\n","size":2720,"noattachment":false,"key":"/uncrypto/-/uncrypto-0.1.0.tgz"},"_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"directories":{},"maintainers":[{"name":"pi0","email":"pyapar@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uncrypto_0.1.0_1675715198333_0.12297272753188104"},"_hasShrinkwrap":false,"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","publish_time":1675715198473,"_cnpm_publish_time":1675715198473,"dist-tags":{"latest":"0.1.3"}}