{"_id":"@atlex/encryption","_rev":"17-739a53d2a7a2399fec40d1279551c3a1","name":"@atlex/encryption","dist-tags":{"latest":"0.2.2"},"versions":{"0.1.1":{"name":"@atlex/encryption","version":"0.1.1","keywords":["atlex","encryption","typescript"],"author":{"url":"https://github.com/khamazaspyan","name":"Karen Hamazaspyan"},"license":"MIT","_id":"@atlex/encryption@0.1.1","maintainers":[{"name":"khamazaspyan","email":"khamazaspyan@gmail.com"}],"homepage":"https://atlex.dev","bugs":{"url":"https://github.com/atlex-framework/atlex-monorepo/issues"},"dist":{"shasum":"ceb084b28516abf270fc921535543979ce72969e","tarball":"https://registry.npmjs.org/@atlex/encryption/-/encryption-0.1.1.tgz","fileCount":28,"integrity":"sha512-asPrITJcH78TTaIN9GDff3PXde8KB62zqf1a/zYUGVztcSiT254XOUVfjoPo+J642hrbGeFmNPn/SltpldIXzw==","signatures":[{"sig":"MEYCIQC7HdQmu19G/glaqPk+zoJPet0WFsBMXVtabWXo8fJ+xQIhAMf+nulsAn1aDxaLMZIP0TuvQesvjE1aPR96HOCH/Mxm","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":37593},"main":"./dist/index.js","type":"module","_from":"file:atlex-encryption-0.1.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"scripts":{"lint":"tsc --noEmit -p tsconfig.json","test":"vitest run -c vitest.config.ts","build":"tsc -p tsconfig.json","typecheck":"tsc --noEmit -p tsconfig.json"},"_npmUser":{"name":"khamazaspyan","email":"khamazaspyan@gmail.com"},"_resolved":"/tmp/e2a54fb4e655dbd430527d6134f55fa9/atlex-encryption-0.1.1.tgz","_integrity":"sha512-asPrITJcH78TTaIN9GDff3PXde8KB62zqf1a/zYUGVztcSiT254XOUVfjoPo+J642hrbGeFmNPn/SltpldIXzw==","repository":{"url":"git+https://github.com/atlex-framework/atlex-monorepo.git","type":"git","directory":"packages/encryption"},"_npmVersion":"10.9.7","description":"AES-256-GCM encryption utilities for Atlex","directories":{},"_nodeVersion":"22.22.2","dependencies":{"@atlex/core":"0.1.1","@atlex/config":"0.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","typescript":"^5.0.0","@types/node":"^20.0.0"},"peerDependencies":{"@atlex/core":"0.1.1","@atlex/config":"0.1.1"},"_npmOperationalInternal":{"tmp":"tmp/encryption_0.1.1_1776194466552_0.3655922679007295","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@atlex/encryption","version":"0.1.2","keywords":["atlex","encryption","typescript"],"author":{"url":"https://github.com/khamazaspyan","name":"Karen Hamazaspyan"},"license":"MIT","_id":"@atlex/encryption@0.1.2","maintainers":[{"name":"khamazaspyan","email":"khamazaspyan@gmail.com"}],"homepage":"https://atlex.dev","bugs":{"url":"https://github.com/atlex-framework/encryption/issues"},"dist":{"shasum":"ddb38b447183c252c137b23a4b6d95f50c54b579","tarball":"https://registry.npmjs.org/@atlex/encryption/-/encryption-0.1.2.tgz","fileCount":28,"integrity":"sha512-TUd+28t252pzaGPUQKPV1e9Wto4uOeVxGM5bJeg66QNd/ULvVGPIAGNWdS9DJpxewAE4DpiI0rINNgtJO+Q6bA==","signatures":[{"sig":"MEYCIQD96/NMvEMK+eqsibvhTnlyO6v/1H5JlqU68ezL+3086QIhALQYAglaxLrSGyo4D/KifcHq9vZrHe5bj2udftOnflnZ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":37713},"main":"./dist/index.js","type":"module","_from":"file:atlex-encryption-0.1.2.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"scripts":{"lint":"tsc --noEmit -p tsconfig.json","test":"vitest run -c vitest.config.ts","build":"tsc -p tsconfig.json","typecheck":"tsc --noEmit -p tsconfig.json"},"_npmUser":{"name":"khamazaspyan","email":"khamazaspyan@gmail.com"},"_resolved":"/tmp/7b9bcdda0cb535b8162f46151c75f090/atlex-encryption-0.1.2.tgz","_integrity":"sha512-TUd+28t252pzaGPUQKPV1e9Wto4uOeVxGM5bJeg66QNd/ULvVGPIAGNWdS9DJpxewAE4DpiI0rINNgtJO+Q6bA==","repository":{"url":"git+https://github.com/atlex-framework/encryption.git","type":"git","directory":"packages/encryption"},"_npmVersion":"10.9.7","description":"AES-256-GCM encryption utilities for Atlex","directories":{},"_nodeVersion":"22.22.2","dependencies":{"@atlex/core":"0.1.2","@atlex/config":"0.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","typescript":"^5.0.0","@types/node":"^20.0.0"},"peerDependencies":{"@atlex/core":"0.1.2","@atlex/config":"0.1.2"},"_npmOperationalInternal":{"tmp":"tmp/encryption_0.1.2_1776235376773_0.19185253845467432","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@atlex/encryption","version":"0.1.3","keywords":["atlex","encryption","typescript"],"author":{"url":"https://github.com/khamazaspyan","name":"Karen Hamazaspyan"},"license":"MIT","_id":"@atlex/encryption@0.1.3","maintainers":[{"name":"khamazaspyan","email":"khamazaspyan@gmail.com"}],"homepage":"https://atlex.dev","bugs":{"url":"https://github.com/atlex-framework/encryption/issues"},"dist":{"shasum":"36ecb134e79835f0629d5683ca30fe6fb1d215f0","tarball":"https://registry.npmjs.org/@atlex/encryption/-/encryption-0.1.3.tgz","fileCount":28,"integrity":"sha512-58M1gUvRMhZQSKAocaYUI52gS3RH7hjit+lmzqqyoyyBAJdiYA39IT8hMzIxplnLJq5+pjrpVn3dxz8V14ATpw==","signatures":[{"sig":"MEYCIQD4iR1gr3hlpumzZ5Tu6UaJKcHO0I1PAVUq50umHhHhUwIhAM/CvbMSt4Gq4I1R93pz+Pyo5JMiKl/Z5ZwmT9/ZDDFU","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":37854},"main":"./dist/index.js","type":"module","_from":"file:atlex-encryption-0.1.3.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"scripts":{"lint":"tsc --noEmit -p tsconfig.json","test":"vitest run -c vitest.config.ts","build":"tsc -p tsconfig.json","typecheck":"tsc --noEmit -p tsconfig.json"},"_npmUser":{"name":"khamazaspyan","email":"khamazaspyan@gmail.com"},"_resolved":"/tmp/8ed265b5ffbb9dbd9e477e44bfd776b7/atlex-encryption-0.1.3.tgz","_integrity":"sha512-58M1gUvRMhZQSKAocaYUI52gS3RH7hjit+lmzqqyoyyBAJdiYA39IT8hMzIxplnLJq5+pjrpVn3dxz8V14ATpw==","repository":{"url":"git+https://github.com/atlex-framework/encryption.git","type":"git","directory":"packages/encryption"},"_npmVersion":"10.9.7","description":"AES-256-GCM encryption utilities for Atlex","directories":{},"_nodeVersion":"22.22.2","dependencies":{"@atlex/core":"0.1.3","@atlex/config":"0.1.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","typescript":"^5.0.0","@types/node":"^20.0.0"},"peerDependencies":{"@atlex/core":"0.1.3","@atlex/config":"0.1.3"},"_npmOperationalInternal":{"tmp":"tmp/encryption_0.1.3_1776256067162_0.04177387973360913","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@atlex/encryption","version":"0.1.4","keywords":["atlex","encryption","aes","aes-256","aes-256-gcm","crypto","cryptography","key-rotation","data-encryption","secure","cipher","laravel-encryption","laravel-alternative","nodejs","javascript","typescript"],"author":{"url":"https://github.com/khamazaspyan","name":"Karen Hamazaspyan"},"license":"MIT","_id":"@atlex/encryption@0.1.4","maintainers":[{"name":"khamazaspyan","email":"khamazaspyan@gmail.com"}],"homepage":"https://atlex.dev","bugs":{"url":"https://github.com/atlex-framework/encryption/issues"},"dist":{"shasum":"bc5964eeb0b4de305172bf8669360f966ad6a04a","tarball":"https://registry.npmjs.org/@atlex/encryption/-/encryption-0.1.4.tgz","fileCount":28,"integrity":"sha512-FYwsXiTeY0KDA1env/y+iQ4kXZDL2l9dxDuu0evZ5HkoTn+PXRPegixO/RyJRPQNtL0fNZnZEZEWm+2VXyUt9g==","signatures":[{"sig":"MEQCIDGjVArnKt9plGWYdgb3CmdQehqNaSY8x6wxwtPn3axOAiBogZVr1yG/p5bIb99hhrGbZvtzKEfxbWC7rVS7o1vDAg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":38337},"main":"./dist/index.js","type":"module","_from":"file:atlex-encryption-0.1.4.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"scripts":{"lint":"tsc --noEmit -p tsconfig.json","test":"vitest run -c vitest.config.ts","build":"tsc -p tsconfig.json","typecheck":"tsc --noEmit -p tsconfig.json"},"_npmUser":{"name":"khamazaspyan","email":"khamazaspyan@gmail.com"},"_resolved":"/tmp/8146172372770ed4c0c914d583529a06/atlex-encryption-0.1.4.tgz","_integrity":"sha512-FYwsXiTeY0KDA1env/y+iQ4kXZDL2l9dxDuu0evZ5HkoTn+PXRPegixO/RyJRPQNtL0fNZnZEZEWm+2VXyUt9g==","repository":{"url":"git+https://github.com/atlex-framework/encryption.git","type":"git","directory":"packages/encryption"},"_npmVersion":"10.9.7","description":"AES-256-GCM encryption utilities for Atlex","directories":{},"_nodeVersion":"22.22.2","dependencies":{"@atlex/core":"0.1.4","@atlex/config":"0.1.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","typescript":"^5.0.0","@types/node":"^20.0.0"},"peerDependencies":{"@atlex/core":"0.1.4","@atlex/config":"0.1.4"},"_npmOperationalInternal":{"tmp":"tmp/encryption_0.1.4_1776259436415_0.7369927767747864","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"@atlex/encryption","version":"0.1.5","keywords":["atlex","encryption","aes","aes-256","aes-256-gcm","crypto","cryptography","key-rotation","data-encryption","secure","cipher","laravel-encryption","laravel-alternative","nodejs","javascript","typescript"],"author":{"url":"https://github.com/khamazaspyan","name":"Karen Hamazaspyan"},"license":"MIT","_id":"@atlex/encryption@0.1.5","maintainers":[{"name":"khamazaspyan","email":"khamazaspyan@gmail.com"}],"homepage":"https://atlex.dev","bugs":{"url":"https://github.com/atlex-framework/encryption/issues"},"dist":{"shasum":"ac2e19e246672eab26c2e206618ac4888b978e38","tarball":"https://registry.npmjs.org/@atlex/encryption/-/encryption-0.1.5.tgz","fileCount":28,"integrity":"sha512-pdxDbVWuCynmehyNtK1vevQH339ZONBuhE+c0Bg1Al6zWcPUFidNn93O/j9AX9ZewyQn1PSy9ii94dz291E09w==","signatures":[{"sig":"MEQCIAX2HBCWOnTUs3yU+ODEQhCIfBB6qy1jFjxR00KvrMKtAiB/jV6pHVAVSLpbahuJyk8xnVA+p+jkHuXMjvCHxT+0DQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":38465},"main":"./dist/index.js","type":"module","_from":"file:atlex-encryption-0.1.5.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"scripts":{"lint":"tsc --noEmit -p tsconfig.json","test":"vitest run -c vitest.config.ts","build":"tsc -p tsconfig.json","typecheck":"tsc --noEmit -p tsconfig.json"},"_npmUser":{"name":"khamazaspyan","email":"khamazaspyan@gmail.com"},"_resolved":"/tmp/23cd11f459444f17e067bda87e63d581/atlex-encryption-0.1.5.tgz","_integrity":"sha512-pdxDbVWuCynmehyNtK1vevQH339ZONBuhE+c0Bg1Al6zWcPUFidNn93O/j9AX9ZewyQn1PSy9ii94dz291E09w==","repository":{"url":"git+https://github.com/atlex-framework/encryption.git","type":"git","directory":"packages/encryption"},"_npmVersion":"10.9.7","description":"AES-256-GCM encryption utilities for Atlex","directories":{},"_nodeVersion":"22.22.2","dependencies":{"@atlex/core":"0.1.5","@atlex/config":"0.1.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","typescript":"^5.0.0","@types/node":"^20.0.0"},"peerDependencies":{"@atlex/core":"0.1.5","@atlex/config":"0.1.5"},"_npmOperationalInternal":{"tmp":"tmp/encryption_0.1.5_1776260707508_0.796564785789176","host":"s3://npm-registry-packages-npm-production"}},"0.1.6":{"name":"@atlex/encryption","version":"0.1.6","keywords":["atlex","encryption","aes","aes-256","aes-256-gcm","crypto","cryptography","key-rotation","data-encryption","secure","cipher","laravel-encryption","laravel-alternative","nodejs","javascript","typescript"],"author":{"url":"https://github.com/khamazaspyan","name":"Karen Hamazaspyan"},"license":"MIT","_id":"@atlex/encryption@0.1.6","maintainers":[{"name":"khamazaspyan","email":"khamazaspyan@gmail.com"}],"homepage":"https://atlex.dev","bugs":{"url":"https://github.com/atlex-framework/encryption/issues"},"dist":{"shasum":"a4ec3fc54eba4e1448e5db47d598f842b3a0bac9","tarball":"https://registry.npmjs.org/@atlex/encryption/-/encryption-0.1.6.tgz","fileCount":28,"integrity":"sha512-dWU5/fXcTG2qqiaOCrimZi7wcZUkuEamu58rG3Ep6woK819Strz+eLKEdeMstVrOTLh/T3Bn4JBoJ7NkM6c2/g==","signatures":[{"sig":"MEUCIHZ26dDGgEh5yZ2KEJtJujPjAryjD7HHJ7PIRa3OMvpBAiEA/sJSKWMqiv3IxHigLtZOdwytPOPno1Bqe+5y15pyiuc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":38622},"main":"./dist/index.js","type":"module","_from":"file:atlex-encryption-0.1.6.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"scripts":{"lint":"tsc --noEmit -p tsconfig.json","test":"vitest run -c vitest.config.ts","build":"tsc -p tsconfig.json","typecheck":"tsc --noEmit -p tsconfig.json"},"_npmUser":{"name":"khamazaspyan","email":"khamazaspyan@gmail.com"},"_resolved":"/tmp/1fdea03fe3fee98898229ded0eff3edc/atlex-encryption-0.1.6.tgz","_integrity":"sha512-dWU5/fXcTG2qqiaOCrimZi7wcZUkuEamu58rG3Ep6woK819Strz+eLKEdeMstVrOTLh/T3Bn4JBoJ7NkM6c2/g==","repository":{"url":"git+https://github.com/atlex-framework/encryption.git","type":"git","directory":"packages/encryption"},"_npmVersion":"10.9.7","description":"AES-256-GCM encryption utilities for Atlex","directories":{},"_nodeVersion":"22.22.2","dependencies":{"@atlex/core":"0.1.6","@atlex/config":"0.1.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","typescript":"^5.0.0","@types/node":"^20.0.0"},"peerDependencies":{"@atlex/core":"0.1.6","@atlex/config":"0.1.6"},"_npmOperationalInternal":{"tmp":"tmp/encryption_0.1.6_1778694345712_0.01754936828762199","host":"s3://npm-registry-packages-npm-production"}},"0.1.7":{"name":"@atlex/encryption","version":"0.1.7","keywords":["atlex","encryption","aes","aes-256","aes-256-gcm","crypto","cryptography","key-rotation","data-encryption","secure","cipher","laravel-encryption","laravel-alternative","nodejs","javascript","typescript"],"author":{"url":"https://github.com/khamazaspyan","name":"Karen Hamazaspyan"},"license":"MIT","_id":"@atlex/encryption@0.1.7","maintainers":[{"name":"khamazaspyan","email":"khamazaspyan@gmail.com"}],"homepage":"https://atlex.dev","bugs":{"url":"https://github.com/atlex-framework/encryption/issues"},"dist":{"shasum":"65f2b549da27a67824badee9abd6f207af5e9d9d","tarball":"https://registry.npmjs.org/@atlex/encryption/-/encryption-0.1.7.tgz","fileCount":28,"integrity":"sha512-a+eIKk7J3cVvaH54gssv+VKO4zO29PY1vWYYwmiz3NpigP0mmT/aiXMZWFChegOordcuIKz3vEZTSMg2DhyS1g==","signatures":[{"sig":"MEYCIQDKT7KZkMLr5yW20onGFw/eK5Z6pFtXeR4zp7ZntsK0dgIhANOLQM0K60smoM5hoOzvWSCNjt+Q2oQ2WChS8Qs9EUxR","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":39052},"main":"./dist/index.js","type":"module","_from":"file:atlex-encryption-0.1.7.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"scripts":{"lint":"tsc --noEmit -p tsconfig.json","test":"vitest run -c vitest.config.ts","build":"tsc -p tsconfig.json","typecheck":"tsc --noEmit -p tsconfig.json"},"_npmUser":{"name":"khamazaspyan","email":"khamazaspyan@gmail.com"},"_resolved":"/tmp/8af6997122c4b1d9e5a9fef3ab214519/atlex-encryption-0.1.7.tgz","_integrity":"sha512-a+eIKk7J3cVvaH54gssv+VKO4zO29PY1vWYYwmiz3NpigP0mmT/aiXMZWFChegOordcuIKz3vEZTSMg2DhyS1g==","repository":{"url":"git+https://github.com/atlex-framework/encryption.git","type":"git","directory":"packages/encryption"},"_npmVersion":"10.9.7","description":"AES-256-GCM encryption utilities for Atlex","directories":{},"_nodeVersion":"22.22.2","dependencies":{"@atlex/core":"0.1.7","@atlex/config":"0.1.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","typescript":"^5.0.0","@types/node":"^20.0.0"},"peerDependencies":{"@atlex/core":"0.1.7","@atlex/config":"0.1.7"},"_npmOperationalInternal":{"tmp":"tmp/encryption_0.1.7_1778755069009_0.13097725552748773","host":"s3://npm-registry-packages-npm-production"}},"0.1.8":{"name":"@atlex/encryption","version":"0.1.8","keywords":["atlex","encryption","aes","aes-256","aes-256-gcm","crypto","cryptography","key-rotation","data-encryption","secure","cipher","laravel-encryption","laravel-alternative","nodejs","javascript","typescript"],"author":{"url":"https://github.com/khamazaspyan","name":"Karen Hamazaspyan"},"license":"MIT","_id":"@atlex/encryption@0.1.8","maintainers":[{"name":"khamazaspyan","email":"khamazaspyan@gmail.com"}],"homepage":"https://atlex.dev","bugs":{"url":"https://github.com/atlex-framework/encryption/issues"},"dist":{"shasum":"67df0c3fbec222ad72f4fc9730ef049c4d9ba507","tarball":"https://registry.npmjs.org/@atlex/encryption/-/encryption-0.1.8.tgz","fileCount":28,"integrity":"sha512-FzrsfcYAl07pvbioWnPw+KR+2QQacRo9CsSRP7vSFig74hpslfELQa+Xn0tcJ88IPYD27A1u+0Du1HbIAV0dFA==","signatures":[{"sig":"MEQCICdOcD4qTl05sXv+25QHzftxwk+OsW1r5RyztuIEo/USAiBlma0fNND0jVqPGIIgt2A+pPMVbpZEt0a2o3LGMuzEBQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":39183},"main":"./dist/index.js","type":"module","_from":"file:atlex-encryption-0.1.8.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"scripts":{"lint":"tsc --noEmit -p tsconfig.json","test":"vitest run -c vitest.config.ts","build":"tsc -p tsconfig.json","typecheck":"tsc --noEmit -p tsconfig.json"},"_npmUser":{"name":"khamazaspyan","email":"khamazaspyan@gmail.com"},"_resolved":"/tmp/2bca22f30935912c4b57963656b61d70/atlex-encryption-0.1.8.tgz","_integrity":"sha512-FzrsfcYAl07pvbioWnPw+KR+2QQacRo9CsSRP7vSFig74hpslfELQa+Xn0tcJ88IPYD27A1u+0Du1HbIAV0dFA==","repository":{"url":"git+https://github.com/atlex-framework/encryption.git","type":"git","directory":"packages/encryption"},"_npmVersion":"10.9.7","description":"AES-256-GCM encryption utilities for Atlex","directories":{},"_nodeVersion":"22.22.2","dependencies":{"@atlex/core":"0.1.8","@atlex/config":"0.1.8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","typescript":"^5.0.0","@types/node":"^20.0.0"},"peerDependencies":{"@atlex/core":"0.1.8","@atlex/config":"0.1.8"},"_npmOperationalInternal":{"tmp":"tmp/encryption_0.1.8_1778775509338_0.28815188614053855","host":"s3://npm-registry-packages-npm-production"}},"0.1.9":{"name":"@atlex/encryption","version":"0.1.9","keywords":["atlex","encryption","aes","aes-256","aes-256-gcm","crypto","cryptography","key-rotation","data-encryption","secure","cipher","laravel-encryption","laravel-alternative","nodejs","javascript","typescript"],"author":{"url":"https://github.com/khamazaspyan","name":"Karen Hamazaspyan"},"license":"MIT","_id":"@atlex/encryption@0.1.9","maintainers":[{"name":"khamazaspyan","email":"khamazaspyan@gmail.com"}],"homepage":"https://atlex.dev","bugs":{"url":"https://github.com/atlex-framework/encryption/issues"},"dist":{"shasum":"f67cd8576e56d31db5150b163083141b3b2ba391","tarball":"https://registry.npmjs.org/@atlex/encryption/-/encryption-0.1.9.tgz","fileCount":28,"integrity":"sha512-kCGFL6vqidxTYHGf1VQAy+c0YrSUre2iw8y3zz3jVWX976lfZfhMSD7RN/huOhT1FwFwfWRRD+M1QMyNID94mw==","signatures":[{"sig":"MEQCIE7CAL+G7D5cKW+RX1zOIhERnUfCtCu2CX50eWslFZYhAiAkkYz0GM5a0+7Jh5HtICehsfKbodSyAvNB7gU9pLmpBQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":39326},"main":"./dist/index.js","type":"module","_from":"file:atlex-encryption-0.1.9.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"scripts":{"lint":"tsc --noEmit -p tsconfig.json","test":"vitest run -c vitest.config.ts","build":"tsc -p tsconfig.json","typecheck":"tsc --noEmit -p tsconfig.json"},"_npmUser":{"name":"khamazaspyan","email":"khamazaspyan@gmail.com"},"_resolved":"/tmp/bd76737fc436079a28c30c84595d31ce/atlex-encryption-0.1.9.tgz","_integrity":"sha512-kCGFL6vqidxTYHGf1VQAy+c0YrSUre2iw8y3zz3jVWX976lfZfhMSD7RN/huOhT1FwFwfWRRD+M1QMyNID94mw==","repository":{"url":"git+https://github.com/atlex-framework/encryption.git","type":"git","directory":"packages/encryption"},"_npmVersion":"10.9.7","description":"AES-256-GCM encryption utilities for Atlex","directories":{},"_nodeVersion":"22.22.2","dependencies":{"@atlex/core":"0.1.9","@atlex/config":"0.1.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","typescript":"^5.0.0","@types/node":"^20.0.0"},"peerDependencies":{"@atlex/core":"0.1.9","@atlex/config":"0.1.9"},"_npmOperationalInternal":{"tmp":"tmp/encryption_0.1.9_1778830235858_0.08309959184524196","host":"s3://npm-registry-packages-npm-production"}},"0.1.10":{"name":"@atlex/encryption","version":"0.1.10","keywords":["atlex","encryption","aes","aes-256","aes-256-gcm","crypto","cryptography","key-rotation","data-encryption","secure","cipher","laravel-encryption","laravel-alternative","nodejs","javascript","typescript"],"author":{"url":"https://github.com/khamazaspyan","name":"Karen Hamazaspyan"},"license":"MIT","_id":"@atlex/encryption@0.1.10","maintainers":[{"name":"khamazaspyan","email":"khamazaspyan@gmail.com"}],"homepage":"https://atlex.dev","bugs":{"url":"https://github.com/atlex-framework/encryption/issues"},"dist":{"shasum":"3a3a55b7ade3eaf9d7167f9fbf87e8b3b49b032b","tarball":"https://registry.npmjs.org/@atlex/encryption/-/encryption-0.1.10.tgz","fileCount":28,"integrity":"sha512-KtpBn3F6xFG2VbXpbpz3ei9th8ntpMc5Nsd4mAHjxAWAbq2IOWIft/P3d84It3R4r6zi+ofutAtv1NDfVwVR6g==","signatures":[{"sig":"MEUCIQCAOfDEr3p50Osjj981jyZv/+SrgGPsLoMDqvaXuijSTwIgcw1cq6n7xJVdKab7V4NxIUb6mlxDjEipo0oAbF8/b+s=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":39464},"main":"./dist/index.js","type":"module","_from":"file:atlex-encryption-0.1.10.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"scripts":{"lint":"tsc --noEmit -p tsconfig.json","test":"vitest run -c vitest.config.ts","build":"tsc -p tsconfig.json","typecheck":"tsc --noEmit -p tsconfig.json"},"_npmUser":{"name":"khamazaspyan","email":"khamazaspyan@gmail.com"},"_resolved":"/tmp/0674ec5ffa12a65170981068faaf76da/atlex-encryption-0.1.10.tgz","_integrity":"sha512-KtpBn3F6xFG2VbXpbpz3ei9th8ntpMc5Nsd4mAHjxAWAbq2IOWIft/P3d84It3R4r6zi+ofutAtv1NDfVwVR6g==","repository":{"url":"git+https://github.com/atlex-framework/encryption.git","type":"git","directory":"packages/encryption"},"_npmVersion":"10.9.7","description":"AES-256-GCM encryption utilities for Atlex","directories":{},"_nodeVersion":"22.22.2","dependencies":{"@atlex/core":"0.1.10","@atlex/config":"0.1.10"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","typescript":"^5.0.0","@types/node":"^20.0.0"},"peerDependencies":{"@atlex/core":"0.1.10","@atlex/config":"0.1.10"},"_npmOperationalInternal":{"tmp":"tmp/encryption_0.1.10_1778834093226_0.41765639278480293","host":"s3://npm-registry-packages-npm-production"}},"0.1.11":{"name":"@atlex/encryption","version":"0.1.11","keywords":["atlex","encryption","aes","aes-256","aes-256-gcm","crypto","cryptography","key-rotation","data-encryption","secure","cipher","laravel-encryption","laravel-alternative","nodejs","javascript","typescript"],"author":{"url":"https://github.com/khamazaspyan","name":"Karen Hamazaspyan"},"license":"MIT","_id":"@atlex/encryption@0.1.11","maintainers":[{"name":"khamazaspyan","email":"khamazaspyan@gmail.com"}],"homepage":"https://atlex.dev","bugs":{"url":"https://github.com/atlex-framework/encryption/issues"},"dist":{"shasum":"f8512d9e2d1e8138c0aa5b1330e9aa8476caa1d9","tarball":"https://registry.npmjs.org/@atlex/encryption/-/encryption-0.1.11.tgz","fileCount":28,"integrity":"sha512-ZqT3RMhN4/L3KU6Zo2R/pg0fl+pPy0wkPrUfsoaXu8JRz1u0O4OApKLz6N/IyRy/UoM0p4bRe4buUaU49ofrbA==","signatures":[{"sig":"MEQCIEexGrlEkaufWcRnrDxBeo7DS9jd89uMnaaU2CLWPIg+AiBNAqG0cEQivOQ4N8cR/oCANWdoFuCWSmqa9FX/oT5dzQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":39595},"main":"./dist/index.js","type":"module","_from":"file:atlex-encryption-0.1.11.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"scripts":{"lint":"tsc --noEmit -p tsconfig.json","test":"vitest run -c vitest.config.ts","build":"tsc -p tsconfig.json","typecheck":"tsc --noEmit -p tsconfig.json"},"_npmUser":{"name":"khamazaspyan","email":"khamazaspyan@gmail.com"},"_resolved":"/tmp/256f0a1e3ba58f1151b90aee394e4724/atlex-encryption-0.1.11.tgz","_integrity":"sha512-ZqT3RMhN4/L3KU6Zo2R/pg0fl+pPy0wkPrUfsoaXu8JRz1u0O4OApKLz6N/IyRy/UoM0p4bRe4buUaU49ofrbA==","repository":{"url":"git+https://github.com/atlex-framework/encryption.git","type":"git","directory":"packages/encryption"},"_npmVersion":"10.9.8","description":"AES-256-GCM encryption utilities for Atlex","directories":{},"_nodeVersion":"22.22.3","dependencies":{"@atlex/core":"0.1.11","@atlex/config":"0.1.11"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","typescript":"^5.0.0","@types/node":"^20.0.0"},"peerDependencies":{"@atlex/core":"0.1.11","@atlex/config":"0.1.11"},"_npmOperationalInternal":{"tmp":"tmp/encryption_0.1.11_1780144945469_0.9922729374653008","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@atlex/encryption","version":"0.2.0","keywords":["atlex","encryption","aes","aes-256","aes-256-gcm","crypto","cryptography","key-rotation","data-encryption","secure","cipher","laravel-encryption","laravel-alternative","nodejs","javascript","typescript"],"author":{"url":"https://github.com/khamazaspyan","name":"Karen Hamazaspyan"},"license":"MIT","_id":"@atlex/encryption@0.2.0","maintainers":[{"name":"khamazaspyan","email":"khamazaspyan@gmail.com"}],"homepage":"https://atlex.dev","bugs":{"url":"https://github.com/atlex-framework/encryption/issues"},"dist":{"shasum":"77de44e6a1e8c0b8bec0a5f7b5a40722c8a1da1f","tarball":"https://registry.npmjs.org/@atlex/encryption/-/encryption-0.2.0.tgz","fileCount":28,"integrity":"sha512-fWLj4X5rYX7pXNU4FVoDUCNl/idHBg40Gh3RYa1L6xR0LsFck6K03bMixVj1z3Dt/2/C2mfuCq5MzhtMMo0PSg==","signatures":[{"sig":"MEYCIQCeRimocP7AMcblayZjCbqpzuoJUTQtKQytLaixiREYiQIhAJfYnstf0Df/dAz4+jE0I3OkDOgOKteYSXzqjKlVNNuw","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":40812},"main":"./dist/index.js","type":"module","_from":"file:atlex-encryption-0.2.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"scripts":{"lint":"tsc --noEmit -p tsconfig.json","test":"vitest run -c vitest.config.ts","build":"tsc -p tsconfig.json","typecheck":"tsc --noEmit -p tsconfig.json"},"_npmUser":{"name":"khamazaspyan","email":"khamazaspyan@gmail.com"},"_resolved":"/tmp/f451f47ce94ac8ee7ebbb71e5c20c1cd/atlex-encryption-0.2.0.tgz","_integrity":"sha512-fWLj4X5rYX7pXNU4FVoDUCNl/idHBg40Gh3RYa1L6xR0LsFck6K03bMixVj1z3Dt/2/C2mfuCq5MzhtMMo0PSg==","repository":{"url":"git+https://github.com/atlex-framework/encryption.git","type":"git","directory":"packages/encryption"},"_npmVersion":"10.9.8","description":"AES-256-GCM encryption utilities for Atlex","directories":{},"_nodeVersion":"22.22.3","dependencies":{"@atlex/core":"0.2.0","@atlex/config":"0.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","typescript":"^5.0.0","@types/node":"^20.0.0"},"peerDependencies":{"@atlex/core":">=0.2.0","@atlex/config":">=0.2.0"},"_npmOperationalInternal":{"tmp":"tmp/encryption_0.2.0_1780306532404_0.1529205310450319","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@atlex/encryption","version":"0.2.1","keywords":["atlex","encryption","aes","aes-256","aes-256-gcm","crypto","cryptography","key-rotation","data-encryption","secure","cipher","laravel-encryption","laravel-alternative","nodejs","javascript","typescript"],"author":{"url":"https://github.com/khamazaspyan","name":"Karen Hamazaspyan"},"license":"MIT","_id":"@atlex/encryption@0.2.1","maintainers":[{"name":"khamazaspyan","email":"khamazaspyan@gmail.com"}],"homepage":"https://atlex.dev","bugs":{"url":"https://github.com/atlex-framework/encryption/issues"},"dist":{"shasum":"8bbb2e048584f7051965402271d4e99ebf6a7cc8","tarball":"https://registry.npmjs.org/@atlex/encryption/-/encryption-0.2.1.tgz","fileCount":28,"integrity":"sha512-Je/WGI7QQBildKdoBfzyAorDz3aMgsOCvJdjq9FpDHETfl9CTaEVP6doK8CkrD+V/gcwpRv0sGayW47hWTIA/g==","signatures":[{"sig":"MEUCIETrXodkGWlkO5qaDetvSnZ+DcbnAXWWRBU4QIE/MBb3AiEAuToHr1gFd6Vh2xSDIbP8q9ML1AC9X6EqU/Hf0Y3jFEM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":40955},"main":"./dist/index.js","type":"module","_from":"file:atlex-encryption-0.2.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"scripts":{"lint":"tsc --noEmit -p tsconfig.json","test":"vitest run -c vitest.config.ts","build":"tsc -p tsconfig.json","typecheck":"tsc --noEmit -p tsconfig.json"},"_npmUser":{"name":"khamazaspyan","email":"khamazaspyan@gmail.com"},"_resolved":"/tmp/31bf58e7bbcdf4acf8df31797d772e6b/atlex-encryption-0.2.1.tgz","_integrity":"sha512-Je/WGI7QQBildKdoBfzyAorDz3aMgsOCvJdjq9FpDHETfl9CTaEVP6doK8CkrD+V/gcwpRv0sGayW47hWTIA/g==","repository":{"url":"git+https://github.com/atlex-framework/encryption.git","type":"git","directory":"packages/encryption"},"_npmVersion":"10.9.8","description":"AES-256-GCM encryption utilities for Atlex","directories":{},"_nodeVersion":"22.22.3","dependencies":{"@atlex/core":"0.2.1","@atlex/config":"0.2.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","typescript":"^5.0.0","@types/node":"^20.0.0"},"peerDependencies":{"@atlex/core":">=0.2.1","@atlex/config":">=0.2.1"},"_npmOperationalInternal":{"tmp":"tmp/encryption_0.2.1_1780423650051_0.9415205094699957","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@atlex/encryption","version":"0.2.2","description":"AES-256-GCM encryption utilities for Atlex","type":"module","license":"MIT","author":{"name":"Karen Hamazaspyan","url":"https://github.com/khamazaspyan"},"keywords":["atlex","encryption","aes","aes-256","aes-256-gcm","crypto","cryptography","key-rotation","data-encryption","secure","cipher","laravel-encryption","laravel-alternative","nodejs","javascript","typescript"],"engines":{"node":">=20"},"repository":{"type":"git","url":"git+https://github.com/atlex-framework/encryption.git","directory":"packages/encryption"},"homepage":"https://atlex.dev","bugs":{"url":"https://github.com/atlex-framework/encryption/issues"},"publishConfig":{"access":"public"},"main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"dependencies":{"@atlex/config":"0.2.2","@atlex/core":"0.2.2"},"peerDependencies":{"@atlex/config":">=0.2.2","@atlex/core":">=0.2.2"},"devDependencies":{"@types/node":"^20.0.0","typescript":"^5.0.0","vitest":"^3.2.4"},"scripts":{"build":"tsc -p tsconfig.json","lint":"tsc --noEmit -p tsconfig.json","typecheck":"tsc --noEmit -p tsconfig.json","test":"vitest run -c vitest.config.ts"},"_id":"@atlex/encryption@0.2.2","_integrity":"sha512-UBoqjX4AFLlk0G5pPod7HG0SL0ZZ3ieze5PP0os1UgziETFKp9jzwQ3yFYRr5z4un+lXU6tNRvvmNhl3rl+MSg==","_resolved":"/tmp/77295826c0fedeb69346913b068a8b00/atlex-encryption-0.2.2.tgz","_from":"file:atlex-encryption-0.2.2.tgz","_nodeVersion":"22.23.1","_npmVersion":"10.9.8","dist":{"integrity":"sha512-UBoqjX4AFLlk0G5pPod7HG0SL0ZZ3ieze5PP0os1UgziETFKp9jzwQ3yFYRr5z4un+lXU6tNRvvmNhl3rl+MSg==","shasum":"a48f10f2df0f286165a4916bdbb66904ab31381c","tarball":"https://registry.npmjs.org/@atlex/encryption/-/encryption-0.2.2.tgz","fileCount":28,"unpackedSize":41094,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEMCIH3FgCnHZ8wPDhllmay2TlZBWa0fAZAsOgsiFgyPncm1Ah92uGBmHCdlconVCXejjNROcxQXD1CE7iNdOyEX24vY"}]},"_npmUser":{"name":"khamazaspyan","email":"khamazaspyan@gmail.com"},"directories":{},"maintainers":[{"name":"khamazaspyan","email":"khamazaspyan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/encryption_0.2.2_1784391578788_0.35220797352824107"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-14T19:21:06.388Z","modified":"2026-07-18T16:19:39.130Z","0.1.0-beta":"2026-04-11T21:23:15.255Z","0.1.1":"2026-04-14T19:21:06.685Z","0.1.2":"2026-04-15T06:42:56.907Z","0.1.3":"2026-04-15T12:27:47.310Z","0.1.4":"2026-04-15T13:23:56.625Z","0.1.5":"2026-04-15T13:45:07.637Z","0.1.6":"2026-05-13T17:45:45.877Z","0.1.7":"2026-05-14T10:37:49.215Z","0.1.8":"2026-05-14T16:18:29.489Z","0.1.9":"2026-05-15T07:30:36.009Z","0.1.10":"2026-05-15T08:34:53.367Z","0.1.11":"2026-05-30T12:42:25.614Z","0.2.0":"2026-06-01T09:35:32.543Z","0.2.1":"2026-06-02T18:07:30.196Z","0.2.2":"2026-07-18T16:19:38.973Z"},"bugs":{"url":"https://github.com/atlex-framework/encryption/issues"},"author":{"name":"Karen Hamazaspyan","url":"https://github.com/khamazaspyan"},"license":"MIT","homepage":"https://atlex.dev","keywords":["atlex","encryption","aes","aes-256","aes-256-gcm","crypto","cryptography","key-rotation","data-encryption","secure","cipher","laravel-encryption","laravel-alternative","nodejs","javascript","typescript"],"repository":{"type":"git","url":"git+https://github.com/atlex-framework/encryption.git","directory":"packages/encryption"},"description":"AES-256-GCM encryption utilities for Atlex","maintainers":[{"name":"khamazaspyan","email":"khamazaspyan@gmail.com"}],"readme":"# @atlex/encryption\n\n> AES-256-GCM encryption with automatic key rotation.\n\n[![npm](https://img.shields.io/npm/v/@atlex/encryption.svg?style=flat-square&color=7c3aed)](https://www.npmjs.com/package/@atlex/encryption)\n[![TypeScript](https://img.shields.io/badge/TypeScript-5.0+-7c3aed.svg?style=flat-square)](https://www.typescriptlang.org/)\n\n[![Buy Me A Coffee](https://img.shields.io/badge/Buy%20Me%20A%20Coffee-Support-yellow?style=flat-square&logo=buy-me-a-coffee)](https://buymeacoffee.com/khamazaspyan)\n\n## Installation\n\n```bash\nnpm install @atlex/encryption\n# or\nyarn add @atlex/encryption\n```\n\n## Quick Start\n\n```typescript\nimport { Encrypter } from '@atlex/encryption'\n\nconst encrypter = new Encrypter(process.env.APP_KEY || '')\n\n// Encrypt and decrypt strings\nconst encrypted = encrypter.encryptString('secret data')\nconst decrypted = encrypter.decryptString(encrypted)\n\n// Encrypt and decrypt objects\nconst data = { userId: 123, email: 'user@example.com' }\nconst encryptedObj = encrypter.encryptObject(data)\nconst decryptedObj = encrypter.decryptObject(encryptedObj)\n```\n\n## Features\n\n- **AES-256-GCM Encryption**: Industry-standard authenticated encryption\n- **Key Rotation**: Seamlessly support multiple encryption keys for rotation\n- **String Encryption**: Encrypt and decrypt text data with automatic encoding\n- **Object Encryption**: Serialize and encrypt complex objects\n- **Type Safety**: Full TypeScript support with proper typing\n- **Automatic Decryption**: Decrypt with any available key in rotation\n- **Exception Handling**: Specific exceptions for decryption failures\n- **Base64 Encoding**: Automatic encoding/decoding of encrypted payloads\n\n## Encryption Basics\n\n### Encrypting and Decrypting Strings\n\n```typescript\nimport { Encrypter } from '@atlex/encryption'\n\nconst encrypter = new Encrypter(process.env.APP_KEY || '')\n\n// Encrypt a string\nconst plaintext = 'This is sensitive data'\nconst encrypted = encrypter.encryptString(plaintext)\n\n// encrypted will look like: 'base64encodedencrypteddata'\n\n// Decrypt back to original\nconst decrypted = encrypter.decryptString(encrypted)\nconsole.log(decrypted) // 'This is sensitive data'\n```\n\n### Encrypting Objects\n\n```typescript\nimport { Encrypter } from '@atlex/encryption'\n\nconst encrypter = new Encrypter(process.env.APP_KEY || '')\n\n// Encrypt complex objects\nconst sensitiveData = {\n  userId: 12345,\n  email: 'user@example.com',\n  creditCard: '4111-1111-1111-1111',\n  metadata: {\n    createdAt: new Date().toISOString(),\n    tags: ['vip', 'verified'],\n  },\n}\n\nconst encrypted = encrypter.encryptObject(sensitiveData)\n\n// Decrypt back to original\nconst decrypted = encrypter.decryptObject(encrypted)\nconsole.log(decrypted.creditCard) // '4111-1111-1111-1111'\n```\n\n### Generic Encryption\n\n```typescript\nimport { Encrypter } from '@atlex/encryption'\n\nconst encrypter = new Encrypter(process.env.APP_KEY || '')\n\n// Encrypt buffer/bytes directly\nconst buffer = Buffer.from('binary data')\nconst encrypted = encrypter.encrypt(buffer)\n\n// Decrypt back to buffer\nconst decrypted = encrypter.decrypt(encrypted)\n```\n\n## Key Management\n\n### Generating Keys\n\n```typescript\nimport { Encrypter } from '@atlex/encryption'\n\n// Generate a new encryption key\nconst newKey = Encrypter.generateKey()\nconsole.log(newKey) // A 32-byte base64-encoded key\n\n// The generated key is ready to use as APP_KEY\n```\n\n### Key Format\n\nKeys can be provided in two formats:\n\n```typescript\nimport { Encrypter } from '@atlex/encryption'\n\n// 1. Raw 32-byte key (base64 encoded)\nconst key1 = 'aGVsbG8td29ybGQtd2l0aDMyYnl0ZWtraWV5IQ=='\nconst encrypter1 = new Encrypter(key1)\n\n// 2. With explicit base64 prefix\nconst key2 = 'base64:aGVsbG8td29ybGQtd2l0aDMyYnl0ZWtraWV5IQ=='\nconst encrypter2 = new Encrypter(key2)\n\n// Both formats work identically\n```\n\n## Key Rotation\n\nSupport multiple keys for seamless key rotation:\n\n```typescript\nimport { Encrypter } from '@atlex/encryption'\n\n// Create encrypter with current key\nconst currentKey = 'base64:' + Buffer.from('a'.repeat(32)).toString('base64')\nconst encrypter = new Encrypter(currentKey)\n\n// Add previous keys for rotation\nconst oldKey1 = 'base64:' + Buffer.from('b'.repeat(32)).toString('base64')\nconst oldKey2 = 'base64:' + Buffer.from('c'.repeat(32)).toString('base64')\n\nencrypter.addKey(oldKey1)\nencrypter.addKey(oldKey2)\n\n// Decrypt works with any key in the rotation chain\nconst encrypted = encrypter.encryptString('secret')\nconst decrypted = encrypter.decryptString(encrypted) // Uses currentKey\n\n// Data encrypted with old keys can still be decrypted\nconst oldEncryptedData = '...' // Encrypted with oldKey1\nconst decrypted = encrypter.decryptString(oldEncryptedData) // Automatically tries all keys\n```\n\n### Getting All Keys\n\n```typescript\nimport { Encrypter } from '@atlex/encryption'\n\nconst encrypter = new Encrypter(process.env.APP_KEY || '')\n\n// Get the current key\nconst currentKey = encrypter.getKey()\n\n// Get all keys (current + previous)\nconst allKeys = encrypter.getAllKeys()\n```\n\n## Error Handling\n\n```typescript\nimport { Encrypter, DecryptException, MissingAppKeyException } from '@atlex/encryption'\n\ntry {\n  const encrypter = new Encrypter('')\n  const data = encrypter.decryptString('invalid_data')\n} catch (error) {\n  if (error instanceof MissingAppKeyException) {\n    console.error('Encryption key is not configured')\n  } else if (error instanceof DecryptException) {\n    console.error('Failed to decrypt data:', error.message)\n  }\n}\n```\n\n### Exception Types\n\n- **MissingAppKeyException**: Thrown when APP_KEY is not configured\n- **DecryptException**: Thrown when decryption fails (invalid data, tampered payload, wrong key)\n\n## Validating Key Length\n\n```typescript\nimport { Encrypter } from '@atlex/encryption'\n\n// Check if a key length is supported\nconst isValid = Encrypter.supportedKeyLength(32)\nconsole.log(isValid) // true\n\nconst isInvalid = Encrypter.supportedKeyLength(16)\nconsole.log(isInvalid) // false - 16 bytes is not supported\n```\n\n## Using with Models\n\n```typescript\nimport { Encrypter } from '@atlex/encryption'\nimport { Model } from '@atlex/orm'\n\nclass User extends Model {\n  private encrypter: Encrypter\n\n  constructor() {\n    super()\n    this.encrypter = new Encrypter(process.env.APP_KEY || '')\n  }\n\n  // Automatically encrypt sensitive attributes\n  getAttribute(key: string) {\n    const value = super.getAttribute(key)\n\n    if (['ssn', 'creditCard', 'apiKey'].includes(key) && value) {\n      return this.encrypter.decryptString(value)\n    }\n\n    return value\n  }\n\n  setAttribute(key: string, value: any) {\n    if (['ssn', 'creditCard', 'apiKey'].includes(key) && value) {\n      value = this.encrypter.encryptString(value)\n    }\n\n    super.setAttribute(key, value)\n  }\n}\n```\n\n## Complete Example\n\n```typescript\nimport { Encrypter } from '@atlex/encryption'\n\nclass EncryptionService {\n  private encrypter: Encrypter\n  private readonly sensitiveFields = ['ssn', 'creditCard', 'bankAccount', 'apiKey']\n\n  constructor(appKey: string = process.env.APP_KEY || '') {\n    this.encrypter = new Encrypter(appKey)\n\n    // Load previous keys for rotation\n    if (process.env.PREVIOUS_APP_KEYS) {\n      const previousKeys = process.env.PREVIOUS_APP_KEYS.split(',')\n      for (const key of previousKeys) {\n        this.encrypter.addKey(key.trim())\n      }\n    }\n  }\n\n  /**\n   * Encrypt a user object, protecting sensitive fields\n   */\n  encryptUser(user: Record<string, any>) {\n    const encrypted = { ...user }\n\n    for (const field of this.sensitiveFields) {\n      if (encrypted[field]) {\n        encrypted[field] = this.encrypter.encryptString(encrypted[field])\n      }\n    }\n\n    return encrypted\n  }\n\n  /**\n   * Decrypt a user object, restoring sensitive fields\n   */\n  decryptUser(user: Record<string, any>) {\n    const decrypted = { ...user }\n\n    for (const field of this.sensitiveFields) {\n      if (decrypted[field]) {\n        try {\n          decrypted[field] = this.encrypter.decryptString(decrypted[field])\n        } catch (error) {\n          console.error(`Failed to decrypt field: ${field}`)\n          throw error\n        }\n      }\n    }\n\n    return decrypted\n  }\n\n  /**\n   * Generate a new encryption key\n   */\n  static generateNewKey(): string {\n    return Encrypter.generateKey()\n  }\n\n  /**\n   * Re-encrypt data with a new key\n   */\n  reEncryptString(encrypted: string, newEncrypter: Encrypter): string {\n    const plaintext = this.encrypter.decryptString(encrypted)\n    return newEncrypter.encryptString(plaintext)\n  }\n}\n\n// Usage\nconst encryptionService = new EncryptionService()\n\nconst user = {\n  id: 1,\n  name: 'John Doe',\n  ssn: '123-45-6789',\n  creditCard: '4111-1111-1111-1111',\n}\n\n// Encrypt sensitive data\nconst encryptedUser = encryptionService.encryptUser(user)\nconsole.log(encryptedUser.creditCard) // Encrypted string\n\n// Store in database...\n\n// Retrieve and decrypt\nconst decryptedUser = encryptionService.decryptUser(encryptedUser)\nconsole.log(decryptedUser.creditCard) // '4111-1111-1111-1111'\n```\n\n## Configuration\n\n### Environment Variables\n\n```env\n# Primary encryption key (32 bytes, base64 encoded)\nAPP_KEY=base64:dGhpcyBpcyBhIDMyLWJ5dGUgZW5jcnlwdGlvbiBrZXk=\n\n# Previous keys for rotation (comma-separated)\nPREVIOUS_APP_KEYS=base64:b2xkLWtleSAxLTMyLWJ5dGVzLWxvbmctZW5j,base64:b2xkLWtleSAyLTMyLWJ5dGVzLWxvbmctZW5j\n```\n\n## API Overview\n\n### Encrypter\n\n| Method                              | Description                       |\n| ----------------------------------- | --------------------------------- |\n| `encrypt(data)`                     | Encrypt buffer/bytes              |\n| `decrypt(data)`                     | Decrypt buffer/bytes              |\n| `encryptString(plaintext)`          | Encrypt string (base64 output)    |\n| `decryptString(encrypted)`          | Decrypt string (base64 input)     |\n| `encryptObject(object)`             | Encrypt serialized object         |\n| `decryptObject(encrypted)`          | Decrypt to object                 |\n| `getKey()`                          | Get current encryption key        |\n| `getAllKeys()`                      | Get all keys (current + previous) |\n| `addKey(key)`                       | Add a key for rotation            |\n| `static generateKey()`              | Generate new 32-byte key          |\n| `static supportedKeyLength(length)` | Check if key length is valid      |\n\n### Exceptions\n\n| Exception                | Description                    |\n| ------------------------ | ------------------------------ |\n| `DecryptException`       | Thrown when decryption fails   |\n| `MissingAppKeyException` | Thrown when APP_KEY is missing |\n\n## Documentation\n\nFor complete documentation, visit [https://atlex.dev/guide/encryption](https://atlex.dev/guide/encryption)\n\n## License\n\n## MIT\n\nPart of [Atlex](https://atlex.dev) — A modern framework for Node.js.\n","readmeFilename":"README.md"}