{"_id":"@altcha/crypto","_rev":"2-a01e8a2890cd7acb78cecf27f59ac2a1","name":"@altcha/crypto","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"name":"@altcha/crypto","version":"0.0.1","keywords":["altcha","crypto","aes","rsa","hybrid","encryption"],"author":{"name":"Daniel Regeci"},"license":"MIT","_id":"@altcha/crypto@0.0.1","maintainers":[{"name":"ovx","email":"getc88@gmail.com"}],"dist":{"shasum":"0e2f254559fb350c80ff56d29b8e3ab2e6bbea95","tarball":"https://registry.npmjs.org/@altcha/crypto/-/crypto-0.0.1.tgz","fileCount":36,"integrity":"sha512-qZMdnoD3lAyvfSUMNtC2adRi666Pxdcw9zqfMU5qBOaJWqpN9K+eqQGWqeiKDMqL0SF+EytNG4kR/Pr/99GJ6g==","signatures":[{"sig":"MEUCIQDpdkE4/xV4BGkuC1wxyvSXdagqYpK9grIgR8OgqrcwVAIgCpOTv7I30TKMpYkLxwxZwobB25CxILDeTG3d4sQJ3FM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38483},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js","require":"./cjs/dist/index.js"},"./aes":{"types":"./dist/aes.d.ts","import":"./dist/aes.js"},"./rsa":{"types":"./dist/rsa.d.ts","import":"./dist/rsa.js"},"./types":{"types":"./dist/types.d.ts","import":"./dist/types.js"},"./cipher":{"types":"./dist/cipher.d.ts","import":"./dist/cipher.js"},"./helpers":{"types":"./dist/helpers.d.ts","import":"./dist/helpers.js"},"./encoding":{"types":"./dist/encoding.d.ts","import":"./dist/encoding.js"},"./node-cipher":{"types":"./dist/node-cipher.d.ts","import":"./dist/node-cipher.js"}},"gitHead":"abf98c5f5c3fd613289b4ec551b6abb1605a6e6b","scripts":{"test":"vitest --run","build":"rimraf dist && rimraf cjs/dist && tsc -b tsconfig.build.json tsconfig.cjs.json","eslint":"eslint ./lib/**/*","format":"prettier --write './(lib|tests)/**/*'","denoify":"rimraf deno_dist && denoify && find deno_dist/. -type f -exec sed -i '' -e 's/node:node:/node:/g' {} +","prepare":"husky","test:deno":"deno --unstable-sloppy-imports test tests/deno.ts"},"_npmUser":{"name":"ovx","email":"getc88@gmail.com"},"_npmVersion":"10.2.4","description":"A lightweight library simplifying asymmetric data encryption using Web Crypto","directories":{},"_nodeVersion":"20.11.1","typesVersions":{"*":{"types":["./dist/types"]}},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.0.0","husky":"^9.0.11","eslint":"^8.56.0","rimraf":"^5.0.5","vitest":"^1.0.1","denoify":"^1.6.9","ts-node":"^10.9.1","prettier":"^3.2.5","typescript":"^5.2.2","@types/node":"^20.9.0","@typescript-eslint/eslint-plugin":"^6.21.0"},"_npmOperationalInternal":{"tmp":"tmp/crypto_0.0.1_1712434502281_0.6706218453105479","host":"s3://npm-registry-packages"}},"0.0.2":{"name":"@altcha/crypto","version":"0.0.2","description":"A lightweight library simplifying asymmetric data encryption using Web Crypto","author":{"name":"Daniel Regeci"},"license":"MIT","keywords":["altcha","crypto","aes","rsa","hybrid","encryption"],"main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","type":"module","scripts":{"build":"rimraf dist && rimraf cjs/dist && tsc -b tsconfig.build.json tsconfig.cjs.json","denoify":"rimraf deno_dist && denoify && find deno_dist/. -type f -exec sed -i '' -e 's/node:node:/node:/g' {} +","eslint":"eslint ./lib/**/*","format":"prettier --write './(lib|tests)/**/*'","test":"vitest --run","test:deno":"deno test --unstable-sloppy-imports tests/deno.ts","prepare":"husky"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./cjs/dist/index.js","default":"./dist/index.js"},"./aes":{"types":"./dist/aes.d.ts","import":"./dist/aes.js","require":"./cjs/dist/aes.js"},"./cipher":{"types":"./dist/cipher.d.ts","import":"./dist/cipher.js","require":"./cjs/dist/cipher.js"},"./encoding":{"types":"./dist/encoding.d.ts","import":"./dist/encoding.js","require":"./cjs/dist/encoding.js"},"./helpers":{"types":"./dist/helpers.d.ts","import":"./dist/helpers.js","require":"./cjs/dist/helpers.js"},"./node-cipher":{"types":"./dist/node-cipher.d.ts","import":"./dist/node-cipher.js","require":"./cjs/dist/node-cipher.js"},"./rsa":{"types":"./dist/rsa.d.ts","import":"./dist/rsa.js","require":"./cjs/dist/rsa.js"},"./types":{"types":"./dist/types.d.ts","import":"./dist/types.js","require":"./cjs/dist/types.js"}},"typesVersions":{"*":{"types":["./dist/types"]}},"devDependencies":{"@types/node":"^20.9.0","@typescript-eslint/eslint-plugin":"^6.21.0","denoify":"^1.6.9","eslint":"^8.56.0","husky":"^9.0.11","prettier":"^3.2.5","rimraf":"^5.0.5","ts-node":"^10.9.1","tsx":"^4.0.0","typescript":"^5.2.2","vitest":"^1.0.1"},"_id":"@altcha/crypto@0.0.2","gitHead":"24420851af48e35ce43f2de5f76d777f762605ce","_nodeVersion":"23.8.0","_npmVersion":"11.3.0","dist":{"integrity":"sha512-wEvXXUbpfA8XMN/2hgsNy3xpJ2Ta8sJ86nYqnr1LlyumWEUPf8A4CuHs+P5w3tVap2AMsxlu+Nx7R5B+XwcKjQ==","shasum":"d3064411d9bc0eee5acdbc356ed9349227778dd5","tarball":"https://registry.npmjs.org/@altcha/crypto/-/crypto-0.0.2.tgz","fileCount":36,"unpackedSize":38771,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDefW2lgjUAkIN2LvDa0e0NEVArjcfQlaVxrKcV5pCE6AIhAKDh7ZTdCOa+kBnZ9kl287ptQ8VCW6kwdbRa0hBE+dg2"}]},"_npmUser":{"name":"ovx","email":"getc88@gmail.com"},"directories":{},"maintainers":[{"name":"ovx","email":"getc88@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/crypto_0.0.2_1746001423636_0.362849122156101"},"_hasShrinkwrap":false}},"time":{"created":"2024-04-06T20:15:02.206Z","modified":"2025-04-30T08:23:44.027Z","0.0.1":"2024-04-06T20:15:02.435Z","0.0.2":"2025-04-30T08:23:43.822Z"},"author":{"name":"Daniel Regeci"},"license":"MIT","keywords":["altcha","crypto","aes","rsa","hybrid","encryption"],"description":"A lightweight library simplifying asymmetric data encryption using Web Crypto","maintainers":[{"name":"ovx","email":"getc88@gmail.com"}],"readme":"# ALTCHA JS Crypto Library\n\nA lightweight library simplifying asymmetric data encryption using Web Crypto. It employs a hybrid approach combining RSA keys and AES encryption for enhanced security.\n\n## Features\n\n- Simplified hybrid encryption using RSA + AES\n- Compatible with all modern browsers supporting Web Crypto\n- Supports node.js streams, facilitating encryption of large files\n\n## Compatibility\n\n- Node.js 20+\n- Bun 1+\n- Deno 1+\n- Modern browsers\n\n## Usage\n\n```ts\nimport { cipher, rsa } from '@altcha/crypto';\n\nconst keyPair = await rsa.generateKeyPair();\n\nconst encrypted = await cipher.encrypt(keyPair.publicKey, new TextEncoder().encode('Hello World'));\n\nconst decrypted = await cipher.decrypt(keyPair.privateKey, encrypted);\n```\n\nNode.js streams:\n\n```ts\nimport { createReadStream, createWriteStream } from 'node:fs';\nimport { nodeCipher, rsa } from '@altcha/crypto';\n\nconst keyPair = await rsa.generateKeyPair();\n\nawait nodeCipher.encryptStream(keyPair.publicKey, createReadStream('./input.txt'), createWriteStream('./output.txt.enc'));\n```\n\n## API\n\nTODO\n\n## License\n\nMIT","readmeFilename":"README.md"}