{"_id":"age-encryption","_rev":"12-fd1a82cefd562df1e20caebd29b0777d","name":"age-encryption","dist-tags":{"latest":"0.3.1"},"versions":{"0.0.1":{"name":"age-encryption","version":"0.0.1","keywords":["age","file encryption","cryptography"],"author":{"url":"https://filippo.io","name":"Filippo Valsorda","email":"npm@filippo.io"},"license":"BSD-3-Clause","_id":"age-encryption@0.0.1","maintainers":[{"name":"filosottile","email":"npmjs@bip.filippo.io"}],"homepage":"https://github.com/FiloSottile/age.ts#readme","bugs":{"url":"https://github.com/FiloSottile/age.ts/issues"},"dist":{"shasum":"0de5cb178cade8701112e767393162d320094e90","tarball":"https://registry.npmjs.org/age-encryption/-/age-encryption-0.0.1.tgz","fileCount":127,"integrity":"sha512-m1Y8YrlQMCS8FUnMX6Jpuk48cIQgArCJriXiFf8DE6iV17zuEjW5rVW/htGo4FmS1nVMtm6swWLHXcfl0QsgEQ==","signatures":[{"sig":"MEQCIDwZKFsCGljE3r3Fz8oUfPdRC2AvWkBpkejHJzjhYLkeAiACydmbJC1d1HNUJdjRGHe000aFmX1aGfaN33w4xTvHSw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1478818},"main":"index.ts","type":"module","gitHead":"dc8c87579fdf6642df68ee73c4ab5fe7820823ea","scripts":{"lint":"eslint .","test":"mocha -r ts-node/register *.test.ts **/*.test.ts"},"_npmUser":{"name":"filosottile","email":"npmjs@bip.filippo.io"},"repository":{"url":"git+https://github.com/FiloSottile/age.ts.git","type":"git"},"_npmVersion":"9.8.0","directories":{},"_nodeVersion":"20.5.0","dependencies":{"bech32-buffer":"^0.2.1","libsodium-wrappers-sumo":"^0.7.11"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^9.2.2","eslint":"^8.45.0","ts-node":"^9.1.1","typescript":"^4.9.5","@types/node":"^17.0.45","@types/mocha":"^8.2.3","@typescript-eslint/parser":"^6.1.0","@types/libsodium-wrappers-sumo":"^0.7.5","@typescript-eslint/eslint-plugin":"^6.1.0"},"_npmOperationalInternal":{"tmp":"tmp/age-encryption_0.0.1_1690804001960_0.5489077967446145","host":"s3://npm-registry-packages"}},"0.0.2":{"name":"age-encryption","version":"0.0.2","keywords":["age","file encryption","cryptography"],"author":{"url":"https://filippo.io","name":"Filippo Valsorda","email":"npm@filippo.io"},"license":"BSD-3-Clause","_id":"age-encryption@0.0.2","maintainers":[{"name":"filosottile","email":"npmjs@bip.filippo.io"}],"homepage":"https://github.com/FiloSottile/age.ts#readme","bugs":{"url":"https://github.com/FiloSottile/age.ts/issues"},"dist":{"shasum":"3c6b6be5a0ae4dfb7614f40326c867543fce5abb","tarball":"https://registry.npmjs.org/age-encryption/-/age-encryption-0.0.2.tgz","fileCount":128,"integrity":"sha512-p73urEXQb2R/T86VQyMRCCW08EgvLkXuiGSGqxwD8m1XF5ZKNfLat1iyY3P4hX3Vul9hcxiVPOA7vaTjD27fHQ==","signatures":[{"sig":"MEUCIQC8EfY8dvVZEJqQclokDjixgFqq0XwlOLjDTudy2efrkgIgWkNk2e7ROI6GCP7eXQcuiDPD2aTXvNcGmYR7MWiHqeY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1480860},"main":"index.ts","type":"module","gitHead":"44d1526e6faec5e60657a1d933bfac0510360420","scripts":{"lint":"eslint .","test":"mocha -r ts-node/register *.test.ts **/*.test.ts"},"_npmUser":{"name":"filosottile","email":"npmjs@bip.filippo.io"},"repository":{"url":"git+https://github.com/FiloSottile/age.ts.git","type":"git"},"_npmVersion":"9.8.0","description":"<p align=\"center\">     <picture>         <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/FiloSottile/age/blob/main/logo/logo_white.svg\">         <source media=\"(prefers-color-scheme: light)\" srcset=\"https://github.com/FiloSottile/a","directories":{},"_nodeVersion":"20.5.0","dependencies":{"bech32-buffer":"^0.2.1","libsodium-wrappers-sumo":"^0.7.11"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^9.2.2","eslint":"^8.45.0","ts-node":"^9.1.1","typescript":"^4.9.5","@types/node":"^17.0.45","@types/mocha":"^8.2.3","@typescript-eslint/parser":"^6.1.0","@types/libsodium-wrappers-sumo":"^0.7.5","@typescript-eslint/eslint-plugin":"^6.1.0"},"_npmOperationalInternal":{"tmp":"tmp/age-encryption_0.0.2_1690809931318_0.49639860579903816","host":"s3://npm-registry-packages"}},"0.0.3":{"name":"age-encryption","version":"0.0.3","keywords":["age","file encryption","cryptography"],"author":{"url":"https://filippo.io","name":"Filippo Valsorda","email":"npm@filippo.io"},"license":"BSD-3-Clause","_id":"age-encryption@0.0.3","maintainers":[{"name":"filosottile","email":"npmjs@bip.filippo.io"}],"homepage":"https://github.com/FiloSottile/age.ts#readme","bugs":{"url":"https://github.com/FiloSottile/age.ts/issues"},"dist":{"shasum":"ee53bdf087965a5af0df618073401f9ba3936a25","tarball":"https://registry.npmjs.org/age-encryption/-/age-encryption-0.0.3.tgz","fileCount":129,"integrity":"sha512-DINPAYUssUUDT27nwrb9NMqkxf+iLJRuGxAZtV9KEnHntvfZKmCNZo3Yajwh5BmkRKru572OqTyNlXL2dATe0Q==","signatures":[{"sig":"MEUCIQC73Ptr9j5heFzL6Me372RUXm4R4PDCeNODX8ZeUakHPgIgUNIB2ft1QWIJJm3ySwgitWnJjuLkFa0x96ZHu9Vpioo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1481734},"main":"index.ts","type":"module","gitHead":"54559ff2c49c2172bb5d87d207352e6a592b1939","scripts":{"lint":"eslint .","test":"mocha -r ts-node/register *.test.ts **/*.test.ts"},"_npmUser":{"name":"filosottile","email":"npmjs@bip.filippo.io"},"repository":{"url":"git+https://github.com/FiloSottile/age.ts.git","type":"git"},"_npmVersion":"9.8.0","description":"<p align=\"center\">     <picture>         <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/FiloSottile/age/blob/main/logo/logo_white.svg\">         <source media=\"(prefers-color-scheme: light)\" srcset=\"https://github.com/FiloSottile/a","directories":{},"_nodeVersion":"20.5.0","dependencies":{"bech32-buffer":"^0.2.1","libsodium-wrappers-sumo":"^0.7.11"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^9.2.2","eslint":"^8.45.0","ts-node":"^9.1.1","typescript":"^4.9.5","@types/node":"^17.0.45","@types/mocha":"^8.2.3","@typescript-eslint/parser":"^6.1.0","@types/libsodium-wrappers-sumo":"^0.7.5","@typescript-eslint/eslint-plugin":"^6.1.0"},"_npmOperationalInternal":{"tmp":"tmp/age-encryption_0.0.3_1690816428529_0.7255882136938778","host":"s3://npm-registry-packages"}},"0.0.4":{"name":"age-encryption","version":"0.0.4","keywords":["age","file encryption","cryptography"],"author":{"url":"https://filippo.io","name":"Filippo Valsorda","email":"npm@filippo.io"},"license":"BSD-3-Clause","_id":"age-encryption@0.0.4","maintainers":[{"name":"filosottile","email":"npmjs@bip.filippo.io"}],"homepage":"https://github.com/FiloSottile/age.ts#readme","bugs":{"url":"https://github.com/FiloSottile/age.ts/issues"},"dist":{"shasum":"303e0d7e755fb7054a35f9d0dea9920dfccd4c4e","tarball":"https://registry.npmjs.org/age-encryption/-/age-encryption-0.0.4.tgz","fileCount":13,"integrity":"sha512-MN/U0NtFP1BRzEBrhM6WRHtrBwXNDSR4CXrZwR/a/gGHLRMV3z6tmxyn3F9olDUu56X5o5YytVbp3NoOCRQ1vQ==","signatures":[{"sig":"MEQCIBVwkwNhV3R19bCwQBhREiICyHeJD2hGKZ/0Zsik6XI+AiBMV9Ziqu7qKtmYHO4m7zS4QCKpfhOIwPvRhQA/KjpDZw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24592},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"ee773dedbb49e525abb3e760fc1934a602268de1","scripts":{"lint":"eslint .","test":"vitest --run","build":"tsc -p tsconfig.build.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"filosottile","email":"npmjs@bip.filippo.io"},"repository":{"url":"git+https://github.com/FiloSottile/age.ts.git","type":"git"},"_npmVersion":"9.8.0","description":"<p align=\"center\">     <picture>         <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/FiloSottile/age/blob/main/logo/logo_white.svg\">         <source media=\"(prefers-color-scheme: light)\" srcset=\"https://github.com/FiloSottile/a","directories":{},"_nodeVersion":"20.5.0","dependencies":{"bech32-buffer":"^0.2.1","libsodium-wrappers-sumo":"^0.7.11"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.45.0","vitest":"^0.34.1","typescript":"^4.9.5","@types/node":"^20.4.8","@typescript-eslint/parser":"^6.1.0","@types/libsodium-wrappers-sumo":"^0.7.5","@typescript-eslint/eslint-plugin":"^6.1.0"},"_npmOperationalInternal":{"tmp":"tmp/age-encryption_0.0.4_1691417778345_0.747434573590412","host":"s3://npm-registry-packages"}},"0.1.5":{"name":"age-encryption","version":"0.1.5","keywords":["age","file encryption","cryptography"],"author":{"url":"https://filippo.io","name":"Filippo Valsorda","email":"npm@filippo.io"},"license":"BSD-3-Clause","_id":"age-encryption@0.1.5","maintainers":[{"name":"filosottile","email":"npmjs@bip.filippo.io"}],"homepage":"https://github.com/FiloSottile/age.ts#readme","bugs":{"url":"https://github.com/FiloSottile/age.ts/issues"},"dist":{"shasum":"a2d2e1e14b344b82e238adfd1b4a992c4a4ca05a","tarball":"https://registry.npmjs.org/age-encryption/-/age-encryption-0.1.5.tgz","fileCount":13,"integrity":"sha512-dCYck6yQczeJHq+Jj+nc3ziBAxcod1DLlNkyLgwJyIOXh32NzzKm3kybXCZuDhecgWLGp1FDEUW2QxqGuHtjuw==","signatures":[{"sig":"MEUCIBgwLh/RCUAaboRo+Xh4RxiBNJOWNxGT75TA2WVVkjebAiEAyQfJ3XLaND/9/jAzrYqfrwc+upy+ylRkQ9vH7mSCm+Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26288},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"e27e645192283d23977e67e7e983491e3193b837","scripts":{"lint":"eslint .","test":"vitest --run","build":"tsc -p tsconfig.build.json","examples:bun":"cd tests/examples && npm install && npm run test:bun","examples:node":"cd tests/examples && npm install && npm run test:node","prepublishOnly":"npm run build","examples:esbuild":"cd tests/examples && npm install && npm run test:esbuild"},"_npmUser":{"name":"filosottile","email":"npmjs@bip.filippo.io"},"repository":{"url":"git+https://github.com/FiloSottile/age.ts.git","type":"git"},"_npmVersion":"10.1.0","description":"<p align=\"center\">     <picture>         <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/FiloSottile/age/blob/main/logo/logo_white.svg\">         <source media=\"(prefers-color-scheme: light)\" srcset=\"https://github.com/FiloSottile/a","directories":{},"_nodeVersion":"20.7.0","dependencies":{"bech32-buffer":"^0.2.1","libsodium-wrappers-sumo":"^0.7.11"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.45.0","vitest":"^0.34.1","typescript":"^4.9.5","@types/node":"^20.4.8","@fast-check/vitest":"^0.0.6","@typescript-eslint/parser":"^6.1.0","@types/libsodium-wrappers-sumo":"^0.7.5","@typescript-eslint/eslint-plugin":"^6.1.0"},"_npmOperationalInternal":{"tmp":"tmp/age-encryption_0.1.5_1699037087704_0.13765221496287516","host":"s3://npm-registry-packages"}},"0.2.0-rc.2":{"name":"age-encryption","version":"0.2.0-rc.2","keywords":["age","file encryption","cryptography"],"author":{"url":"https://filippo.io","name":"Filippo Valsorda","email":"npm@filippo.io"},"license":"BSD-3-Clause","_id":"age-encryption@0.2.0-rc.2","maintainers":[{"name":"filosottile","email":"npmjs@bip.filippo.io"}],"homepage":"https://github.com/FiloSottile/typage#readme","bugs":{"url":"https://github.com/FiloSottile/typage/issues"},"dist":{"shasum":"85e43c1f430d9fa2c383392b06baaf1ea16c9a1b","tarball":"https://registry.npmjs.org/age-encryption/-/age-encryption-0.2.0-rc.2.tgz","fileCount":13,"integrity":"sha512-T499M2SZiJWAzTyvnjXgtcKp+v+QlS5ENFshwCqERRWXjjGDNrdiWGYMxqJe1eTJ4akbvJpmn+rG/bWmontCsA==","signatures":[{"sig":"MEUCIQCZ2zlndV5q+8bVzZvJnqlRLr/KDBO9mLNtfg5EpfDmwwIgKimodcxO/njpqzjZYcXFtSNz8aNbPGXaN+/eUPgovQA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/age-encryption@0.2.0-rc.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":30856},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"7b2992efcf360c4c0613ce9f35e8e15cc483ec2e","scripts":{"lint":"eslint .","test":"vitest --run","bench":"vitest bench --run","build":"tsc -p tsconfig.build.json","test:short":"vitest --run --project node","examples:bun":"cd tests/examples && bun update --no-save && bun run test:bun","examples:node":"cd tests/examples && npm update && npm run test:node","prepublishOnly":"npm run build","examples:esbuild":"cd tests/examples && npm update && npm run test:esbuild"},"_npmUser":{"name":"filosottile","email":"npmjs@bip.filippo.io"},"repository":{"url":"git+https://github.com/FiloSottile/typage.git","type":"git"},"_npmVersion":"10.9.0","description":"<p align=\"center\">     <picture>         <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/FiloSottile/age/blob/main/logo/logo_white.svg\">         <source media=\"(prefers-color-scheme: light)\" srcset=\"https://github.com/FiloSottile/a","directories":{},"_nodeVersion":"22.12.0","dependencies":{"@scure/base":"^1.1.5","@noble/curves":"^1.3.0","@noble/hashes":"^1.3.3","@noble/ciphers":"^1.2.0"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"8.57.1","vitest":"2.1.8","esbuild":"0.24.2","typescript":"5.7.2","@types/node":"22.10.5","webdriverio":"9.5.1","@vitest/browser":"2.1.8","@fast-check/vitest":"0.1.4","@stylistic/eslint-plugin":"2.12.1","@typescript-eslint/parser":"8.19.0","@typescript-eslint/eslint-plugin":"8.19.0"},"_npmOperationalInternal":{"tmp":"tmp/age-encryption_0.2.0-rc.2_1736180819001_0.9053404152619147","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"age-encryption","version":"0.2.0","keywords":["age","file encryption","cryptography"],"author":{"url":"https://filippo.io","name":"Filippo Valsorda","email":"npm@filippo.io"},"license":"BSD-3-Clause","_id":"age-encryption@0.2.0","maintainers":[{"name":"filosottile","email":"npmjs@bip.filippo.io"}],"homepage":"https://github.com/FiloSottile/typage#readme","bugs":{"url":"https://github.com/FiloSottile/typage/issues"},"dist":{"shasum":"79c89a14f4d24bf1cbaff0935dca2800c3aea1b6","tarball":"https://registry.npmjs.org/age-encryption/-/age-encryption-0.2.0.tgz","fileCount":13,"integrity":"sha512-Y05OOztNCxYA68jxAJw+kmwYqXDRV6wVazEGXio1LiUofFn8zIjH++WV0oyq5dEBPyLHrnN/7X/C23qk4r5row==","signatures":[{"sig":"MEQCIH+09Il+IZAOh0NWEJMZymWiQNugQxkmqnxYMbnrqKSWAiBrzXtFlRvk0djlgIzHw3yYoh8mFpVkeSDsuqXO7hrHog==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/age-encryption@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":30888},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"5413c7cda23b3fa63285ab7413f89a780f921b80","scripts":{"lint":"eslint .","test":"vitest --run","bench":"vitest bench --run","build":"tsc -p tsconfig.build.json","test:short":"vitest --run --project node","examples:bun":"cd tests/examples && bun update --no-save && bun run test:bun","examples:node":"cd tests/examples && npm update && npm run test:node","prepublishOnly":"npm run build","examples:esbuild":"cd tests/examples && npm update && npm run test:esbuild"},"_npmUser":{"name":"filosottile","email":"npmjs@bip.filippo.io"},"repository":{"url":"git+https://github.com/FiloSottile/typage.git","type":"git"},"_npmVersion":"10.9.0","description":"<p align=\"center\">     <picture>         <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/FiloSottile/age/blob/main/logo/logo_white.svg\">         <source media=\"(prefers-color-scheme: light)\" srcset=\"https://github.com/FiloSottile/a","directories":{},"_nodeVersion":"22.12.0","dependencies":{"@scure/base":"^1.1.5","@noble/curves":"^1.3.0","@noble/hashes":"^1.3.3","@noble/ciphers":"^1.2.0"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"8.57.1","vitest":"2.1.8","esbuild":"0.24.2","typescript":"5.7.2","@types/node":"22.10.5","webdriverio":"9.5.1","@vitest/browser":"2.1.8","@fast-check/vitest":"0.1.4","@stylistic/eslint-plugin":"2.12.1","@typescript-eslint/parser":"8.19.0","@typescript-eslint/eslint-plugin":"8.19.0"},"_npmOperationalInternal":{"tmp":"tmp/age-encryption_0.2.0_1736181352352_0.9696259860857332","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"age-encryption","version":"0.2.1","keywords":["age","file encryption","cryptography"],"author":{"url":"https://filippo.io","name":"Filippo Valsorda","email":"npm@filippo.io"},"license":"BSD-3-Clause","_id":"age-encryption@0.2.1","maintainers":[{"name":"filosottile","email":"npmjs@bip.filippo.io"}],"homepage":"https://github.com/FiloSottile/typage#readme","bugs":{"url":"https://github.com/FiloSottile/typage/issues"},"dist":{"shasum":"9aaac88ea5ef0009c43355677e86f3a05343bcd0","tarball":"https://registry.npmjs.org/age-encryption/-/age-encryption-0.2.1.tgz","fileCount":15,"integrity":"sha512-EGiFGUoXi02A16tgXTGPi5wt3osmNbjrT7uPAEXs1NxAMFdklW/LWJ5dPx88ZEJF/kRF9zIWDBQoN4ArOjNM8w==","signatures":[{"sig":"MEQCIAUoiE6EpjrElUQ1CymDEvJe9nlniiFkhJ/m8jCOj8A8AiBnjTptMNTJ7yYyR5UnqvgcfXfVjr4OXUxFMxJj3FDNsQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/age-encryption@0.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":46336},"type":"module","types":"./dist/index.d.ts","exports":{".":"./dist/index.js"},"gitHead":"72c0ab861e02cb17bb1306525982f4d5002af2f3","scripts":{"docs":"typedoc","lint":"eslint .","test":"vitest --run","bench":"vitest bench --run","build":"tsc -p tsconfig.build.json","test:short":"vitest --run --project node","examples:bun":"cd tests/examples && bun update --no-save && bun run test:bun","examples:deno":"cd tests/examples && npm update && deno task test:deno","examples:node":"cd tests/examples && npm update && npm run test:node","prepublishOnly":"npm run build","examples:esbuild":"cd tests/examples && npm update && npm run test:esbuild"},"_npmUser":{"name":"filosottile","email":"npmjs@bip.filippo.io"},"repository":{"url":"git+https://github.com/FiloSottile/typage.git","type":"git"},"_npmVersion":"10.9.2","description":"<p align=\"center\">     <picture>         <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/FiloSottile/age/blob/main/logo/logo_white.svg\">         <source media=\"(prefers-color-scheme: light)\" srcset=\"https://github.com/FiloSottile/a","directories":{},"_nodeVersion":"22.13.1","dependencies":{"@scure/base":"^1.1.5","@noble/curves":"^1.3.0","@noble/hashes":"^1.3.3","@noble/ciphers":"^1.2.0"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"9.18.0","vitest":"2.1.8","esbuild":"0.24.2","typedoc":"0.27.6","cctv-age":"0.1.1","@eslint/js":"9.18.0","typescript":"5.7.2","@types/node":"22.10.5","webdriverio":"9.5.1","@vitest/browser":"2.1.8","typescript-eslint":"8.20.0","@fast-check/vitest":"0.1.4","eslint-plugin-tsdoc":"0.4.0","typedoc-plugin-markdown":"4.4.1","@stylistic/eslint-plugin":"2.13.0"},"_npmOperationalInternal":{"tmp":"tmp/age-encryption_0.2.1_1740254664716_0.403965414238588","host":"s3://npm-registry-packages-npm-production"}},"0.2.3":{"name":"age-encryption","version":"0.2.3","keywords":["age","file encryption","cryptography"],"author":{"url":"https://filippo.io","name":"Filippo Valsorda","email":"npm@filippo.io"},"license":"BSD-3-Clause","_id":"age-encryption@0.2.3","maintainers":[{"name":"filosottile","email":"npmjs@bip.filippo.io"}],"homepage":"https://github.com/FiloSottile/typage#readme","bugs":{"url":"https://github.com/FiloSottile/typage/issues"},"dist":{"shasum":"b453cbc45cb28b5d014412759a86215bf9089d76","tarball":"https://registry.npmjs.org/age-encryption/-/age-encryption-0.2.3.tgz","fileCount":19,"integrity":"sha512-8lAcfFbLENeRa+7cznNi0Pzq9fCoiWGHByZ5v04JmVea6tK5lDbPQa3sbZe5RyJNSWN4zMNMguB5uI8BCnxXNw==","signatures":[{"sig":"MEQCIF/Of1h2D9GTD9a/XMCHN7BzdYlbaZv5n5ARnLcMfr7cAiBm5dVuHE1EXf6FqPVegDwfhyGdfK1ZZULEeIfRk9hv0A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/age-encryption@0.2.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":68824},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":"./dist/index.js","gitHead":"f6a354b52091bc8a03d961b8af0c4794e6579efa","scripts":{"docs":"typedoc","lint":"eslint .","test":"vitest --run","bench":"vitest bench --run","build":"tsc -p tsconfig.build.json","serve":"esbuild wwwdev/index.ts --bundle --outdir=wwwdev/js --servedir=wwwdev --sourcemap","test:short":"vitest --run --project node","examples:bun":"cd tests/examples && bun update --no-save && bun run test:bun","examples:deno":"cd tests/examples && npm update && deno task test:deno","examples:node":"cd tests/examples && npm update && npm run test:node","prepublishOnly":"npm run build","examples:esbuild":"cd tests/examples && npm update && npm run test:esbuild"},"_npmUser":{"name":"filosottile","email":"npmjs@bip.filippo.io"},"repository":{"url":"git+https://github.com/FiloSottile/typage.git","type":"git"},"_npmVersion":"10.9.2","description":"<p align=\"center\">     <picture>         <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/FiloSottile/age/blob/main/logo/logo_white.svg\">         <source media=\"(prefers-color-scheme: light)\" srcset=\"https://github.com/FiloSottile/a","directories":{},"_nodeVersion":"22.14.0","dependencies":{"@scure/base":"^1.1.5","@noble/curves":"^1.3.0","@noble/hashes":"^1.3.3","@noble/ciphers":"^1.2.0"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"9.18.0","vitest":"2.1.8","esbuild":"0.24.2","typedoc":"0.27.6","cctv-age":"0.1.2","@eslint/js":"9.18.0","typescript":"5.7.2","@types/node":"22.10.5","webdriverio":"9.5.1","@vitest/browser":"2.1.8","typescript-eslint":"8.20.0","@fast-check/vitest":"0.1.4","eslint-plugin-tsdoc":"0.4.0","typedoc-plugin-markdown":"4.4.1","@stylistic/eslint-plugin":"2.13.0"},"_npmOperationalInternal":{"tmp":"tmp/age-encryption_0.2.3_1745669701164_0.19740885005887798","host":"s3://npm-registry-packages-npm-production"}},"0.2.4":{"name":"age-encryption","version":"0.2.4","keywords":["age","file encryption","cryptography"],"author":{"url":"https://filippo.io","name":"Filippo Valsorda","email":"npm@filippo.io"},"license":"BSD-3-Clause","_id":"age-encryption@0.2.4","maintainers":[{"name":"filosottile","email":"npmjs@bip.filippo.io"}],"homepage":"https://github.com/FiloSottile/typage#readme","bugs":{"url":"https://github.com/FiloSottile/typage/issues"},"dist":{"shasum":"2d42fb6f20d1c7ecdd1f72339fb1d6113f61d379","tarball":"https://registry.npmjs.org/age-encryption/-/age-encryption-0.2.4.tgz","fileCount":21,"integrity":"sha512-9STi5PzVCn3YZurHLMI2njLwCT4ACkHFoktp1JNyFF0m4qHSn9JZQB8nnnJnpEGEJZduVBL1oxZzr4lteqRbzw==","signatures":[{"sig":"MEQCIASqKJX53yexLIUe/9jFnOfZgEqLiK4v530F9+CkOGvIAiAgmccrSHlDskaPYmgdcYbg0cS6398XBvmD5wYDCM5+pg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/age-encryption@0.2.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":78064},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":"./dist/index.js","gitHead":"31e8d9aee8ca5fc1d12d1121abdc120ea3dcc43a","scripts":{"docs":"typedoc","lint":"eslint .","test":"vitest --run","bench":"vitest bench --run","build":"tsc -p tsconfig.build.json","serve":"esbuild wwwdev/index.ts --bundle --outdir=wwwdev/js --servedir=wwwdev --sourcemap","test:slow":"SLOW=1 vitest --run --project node","test:short":"vitest --run --project node","examples:bun":"cd tests/examples && bun install --omit=dev && bun run test:bun","examples:deno":"cd tests/examples && deno install && deno task test:deno","examples:node":"cd tests/examples && npm install --omit=dev && npm run test:node","examples:pnpm":"cd tests/examples && pnpm install --prod && pnpm test:node","examples:yarn":"cd tests/examples && yarn install --prod && yarn test:node","prepublishOnly":"npm run build","examples:esbuild":"cd tests/examples && npm install && npm run test:esbuild"},"_npmUser":{"name":"filosottile","actor":{"name":"filosottile","type":"user","email":"npmjs@bip.filippo.io"},"email":"npmjs@bip.filippo.io"},"repository":{"url":"git+https://github.com/FiloSottile/typage.git","type":"git"},"_npmVersion":"10.9.2","description":"<p align=\"center\">     <picture>         <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/FiloSottile/age/blob/main/logo/logo_white.svg\">         <source media=\"(prefers-color-scheme: light)\" srcset=\"https://github.com/FiloSottile/a","directories":{},"_nodeVersion":"22.16.0","dependencies":{"@scure/base":"^1.1.5","@noble/curves":"^1.3.0","@noble/hashes":"^1.3.3","@noble/ciphers":"^1.2.0"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"9.18.0","vitest":"2.1.8","esbuild":"0.24.2","typedoc":"0.27.6","cctv-age":"0.1.2","@eslint/js":"9.18.0","typescript":"5.7.2","@types/node":"22.10.5","webdriverio":"9.5.1","@vitest/browser":"2.1.8","typescript-eslint":"8.20.0","@fast-check/vitest":"0.1.4","eslint-plugin-tsdoc":"0.4.0","typedoc-plugin-markdown":"4.4.1","@stylistic/eslint-plugin":"2.13.0"},"_npmOperationalInternal":{"tmp":"tmp/age-encryption_0.2.4_1751814050644_0.3622185323957732","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"age-encryption","version":"0.3.0","keywords":["age","file encryption","cryptography"],"author":{"url":"https://filippo.io","name":"Filippo Valsorda","email":"npm@filippo.io"},"license":"BSD-3-Clause","_id":"age-encryption@0.3.0","maintainers":[{"name":"filosottile","email":"npmjs@bip.filippo.io"}],"homepage":"https://github.com/FiloSottile/typage#readme","bugs":{"url":"https://github.com/FiloSottile/typage/issues"},"dist":{"shasum":"002108e68fe23e05fda33d06c18739c54c327f85","tarball":"https://registry.npmjs.org/age-encryption/-/age-encryption-0.3.0.tgz","fileCount":21,"integrity":"sha512-vDhGGp5ZXpbKL6oc3FEBjGhyepr/0SwIWmia6CcPXvYcxGBSQNcDdMv9m2yVOkjjYuJEmtGEhOojIUcjrj0cEw==","signatures":[{"sig":"MEQCIGyMUmEkvnIhBwo/WZCI1392/Yi6ITaLJ9jLqBrzaLueAiAzwP+F5Xvv5FUK8ViktvFcCJBT3tH4aqKcPP1sKwl03g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/age-encryption@0.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":92530},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":"./dist/index.js","gitHead":"647b5bb0e3981e04eb09f45bac007f586087f298","scripts":{"docs":"typedoc","lint":"eslint .","test":"vitest --run","bench":"vitest bench --run","build":"tsc -p tsconfig.build.json","serve":"esbuild wwwdev/index.ts --bundle --outdir=wwwdev/js --servedir=wwwdev --sourcemap","test:slow":"SLOW=1 vitest --run --project node","test:short":"vitest --run --project node","examples:bun":"cd tests/examples && bun install --production && bun run test:bun","examples:deno":"cd tests/examples && deno install && deno task test:deno","examples:node":"cd tests/examples && npm install --omit=dev && npm run test:node","examples:pnpm":"cd tests/examples && pnpm install --prod && pnpm test:node","examples:yarn":"cd tests/examples && yarn install --prod && yarn test:node","prepublishOnly":"npm run build","examples:esbuild":"cd tests/examples && npm install && npm run test:esbuild"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:f8c69cd3-fbd8-4b84-b988-c0255310ace5"}},"repository":{"url":"git+https://github.com/FiloSottile/typage.git","type":"git"},"_npmVersion":"11.6.2","description":"<p align=\"center\">     <picture>         <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/FiloSottile/age/blob/main/logo/logo_white.svg\">         <source media=\"(prefers-color-scheme: light)\" srcset=\"https://github.com/FiloSottile/a","directories":{},"_nodeVersion":"25.2.1","dependencies":{"@scure/base":"^2.0.0","@noble/curves":"^2.0.1","@noble/hashes":"^2.0.1","@noble/ciphers":"^2.1.1","@noble/post-quantum":"^0.5.3"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"9.39.2","vitest":"4.0.16","esbuild":"0.27.2","typedoc":"0.28.15","cctv-age":"0.2.0","@eslint/js":"9.39.2","typescript":"5.9.3","@types/node":"25.0.3","webdriverio":"9.21.0","typescript-eslint":"8.50.0","@fast-check/vitest":"0.2.4","eslint-plugin-tsdoc":"0.5.0","typedoc-plugin-markdown":"4.9.0","@stylistic/eslint-plugin":"5.6.1","@vitest/browser-webdriverio":"4.0.16"},"_npmOperationalInternal":{"tmp":"tmp/age-encryption_0.3.0_1767018500960_0.8734322737511608","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"age-encryption","version":"0.3.1","repository":{"type":"git","url":"git+https://github.com/FiloSottile/typage.git"},"type":"module","main":"./dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","keywords":["age","file encryption","cryptography"],"dependencies":{"@noble/ciphers":"^2.1.1","@noble/curves":"^2.0.1","@noble/hashes":"^2.0.1","@noble/post-quantum":"^0.5.3","@scure/base":"^2.0.0"},"scripts":{"test":"vitest --run","test:short":"vitest --run --project node","test:slow":"SLOW=1 vitest --run --project node","examples:node":"cd tests/examples && npm install --omit=dev && npm run test:node","examples:bun":"cd tests/examples && bun install --production && bun run test:bun","examples:deno":"cd tests/examples && deno install && deno task test:deno","examples:yarn":"cd tests/examples && yarn install --prod && yarn test:node","examples:pnpm":"cd tests/examples && pnpm install --prod && pnpm test:node","examples:esbuild":"cd tests/examples && npm install && npm run test:esbuild","bench":"vitest bench --run","lint":"eslint .","serve":"esbuild wwwdev/index.ts --bundle --outdir=wwwdev/js --servedir=wwwdev --sourcemap","build":"tsc -p tsconfig.build.json","docs":"typedoc","prepublishOnly":"npm run build"},"devDependencies":{"@eslint/js":"9.39.2","@fast-check/vitest":"0.2.4","@stylistic/eslint-plugin":"5.6.1","@types/node":"25.0.3","@vitest/browser-webdriverio":"4.0.16","cctv-age":"0.2.0","esbuild":"0.27.2","eslint":"9.39.2","eslint-plugin-tsdoc":"0.5.0","typedoc":"0.28.15","typedoc-plugin-markdown":"4.9.0","typescript":"5.9.3","typescript-eslint":"8.50.0","vitest":"4.0.16","webdriverio":"9.21.0"},"author":{"name":"Filippo Valsorda","email":"npm@filippo.io","url":"https://filippo.io"},"license":"BSD-3-Clause","gitHead":"38b8b10cb22409de0eaa8a617a01f16dc2e3f9f4","_id":"age-encryption@0.3.1","description":"<p align=\"center\">     <picture>         <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/FiloSottile/age/blob/main/logo/logo_white.svg\">         <source media=\"(prefers-color-scheme: light)\" srcset=\"https://github.com/FiloSottile/a","bugs":{"url":"https://github.com/FiloSottile/typage/issues"},"homepage":"https://github.com/FiloSottile/typage#readme","_nodeVersion":"25.9.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-bYgd7lxM7tEANmb9bXf7xTFB3Qpq+JGKinVSdFh5MV+t2fJJZSTdKhWkvXTFJQGysZd+K9Dt3F+n+4DKazXlnQ==","shasum":"1d63bc585a3274b44addd5c9318cbf020e689e98","tarball":"https://registry.npmjs.org/age-encryption/-/age-encryption-0.3.1.tgz","fileCount":21,"unpackedSize":93266,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/age-encryption@0.3.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDtDwbPWJZm2JfmXdnxhGQiwG8Nd/m4VUsieoEhO4qoFAIhAMXS1cN+CfHEe40RQC2PjjjvVjNvQdyCxgb60p9n1Eno"}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:f8c69cd3-fbd8-4b84-b988-c0255310ace5"}},"directories":{},"maintainers":[{"name":"filosottile","email":"npmjs@bip.filippo.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/age-encryption_0.3.1_1787922363589_0.1514547999721476"},"_hasShrinkwrap":false}},"time":{"created":"2023-07-31T11:46:41.951Z","modified":"2026-08-28T13:06:04.092Z","0.0.1":"2023-07-31T11:46:42.164Z","0.0.2":"2023-07-31T13:25:31.529Z","0.0.3":"2023-07-31T15:13:48.790Z","0.0.4":"2023-08-07T14:16:18.486Z","0.1.5":"2023-11-03T18:44:47.897Z","0.2.0-rc.2":"2025-01-06T16:26:59.141Z","0.2.0":"2025-01-06T16:35:52.763Z","0.2.1":"2025-02-22T20:04:24.994Z","0.2.3":"2025-04-26T12:15:01.409Z","0.2.4":"2025-07-06T15:00:50.834Z","0.3.0":"2025-12-29T14:28:21.113Z","0.3.1":"2026-08-28T13:06:03.726Z"},"bugs":{"url":"https://github.com/FiloSottile/typage/issues"},"author":{"name":"Filippo Valsorda","email":"npm@filippo.io","url":"https://filippo.io"},"license":"BSD-3-Clause","homepage":"https://github.com/FiloSottile/typage#readme","keywords":["age","file encryption","cryptography"],"repository":{"type":"git","url":"git+https://github.com/FiloSottile/typage.git"},"description":"<p align=\"center\">     <picture>         <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/FiloSottile/age/blob/main/logo/logo_white.svg\">         <source media=\"(prefers-color-scheme: light)\" srcset=\"https://github.com/FiloSottile/a","maintainers":[{"name":"filosottile","email":"npmjs@bip.filippo.io"}],"readme":"<p align=\"center\">\n    <picture>\n        <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/FiloSottile/age/blob/main/logo/logo_white.svg\">\n        <source media=\"(prefers-color-scheme: light)\" srcset=\"https://github.com/FiloSottile/age/blob/main/logo/logo.svg\">\n        <img alt=\"The age logo, a wireframe of St. Peters dome in Rome, with the text: age, file encryption\" width=\"600\" src=\"https://github.com/FiloSottile/age/blob/main/logo/logo.svg\">\n    </picture>\n</p>\n\n[`age-encryption`](https://www.npmjs.com/package/age-encryption) is a TypeScript\nimplementation of the [age](https://age-encryption.org) file encryption format.\n\nIt depends only on the [noble](https://paulmillr.com/noble/) cryptography\nlibraries, and uses the Web Crypto API when available.\n\nIt also provides support for symmetric encryption using passkeys and hardware\nsecurity keys in the browser via WebAuthn, and an interoperable CLI plugin and\nGo library for FIDO2 tokens.\n\n## Installation\n\nThis package is `age-encryption` on npm, and `jsr:@age/age-encryption` on JSR.\n\nIt's compiled for ES2023, and compatible with Node.js 20+, Bun, Deno, and all recent browsers.\n\n```sh\nnpm install age-encryption\n```\n\n```sh\ndeno add jsr:@age/age-encryption\n```\n\n## Usage\n\n`age-encryption` is a modern ES Module with built-in types.\n\n#### Encrypt and decrypt a file with a new recipient / identity pair\n\n```ts\nimport * as age from \"age-encryption\"\n\nconst identity = await age.generateIdentity()\nconst recipient = await age.identityToRecipient(identity)\nconsole.log(identity)\nconsole.log(recipient)\n\nconst e = new age.Encrypter()\ne.addRecipient(recipient)\nconst ciphertext = await e.encrypt(\"Hello, age!\")\n\nconst d = new age.Decrypter()\nd.addIdentity(identity)\nconst out = await d.decrypt(ciphertext, \"text\")\nconsole.log(out)\n```\n\n#### Encrypt and decrypt a file with post-quantum hybrid keys\n\n```ts\nimport * as age from \"age-encryption\"\n\nconst identity = await age.generateHybridIdentity()\nconst recipient = await age.identityToRecipient(identity)\nconsole.log(identity)\nconsole.log(recipient)\n\n// ...\n```\n\n#### ASCII armoring\n\nage encrypted files (the inputs of `Decrypter.decrypt` and outputs of\n`Encrypter.encrypt`) are binary files, of type `Uint8Array`. There is an official ASCII\n\"armor\" format, based on PEM, which provides a way to encode an encrypted file as text.\n\n```ts\nimport * as age from \"age-encryption\"\n\nconst identity = await age.generateIdentity()\nconst recipient = await age.identityToRecipient(identity)\nconsole.log(identity)\nconsole.log(recipient)\n\nconst e = new age.Encrypter()\ne.addRecipient(recipient)\nconst ciphertext = await e.encrypt(\"Hello, age!\")\nconst armored = age.armor.encode(ciphertext)\n\nconsole.log(armored)\n// -----BEGIN AGE ENCRYPTED FILE-----\n// YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB0QXVkQmNwZ3ZzYnNRZDJP\n// WlFId3hyeFNmRS9SdUVUTkFhY1FXSno5VUFBClNOSWhEbnhoK21TaEs3SWRGdklw\n// OW9pdlBZbDg3SEVSQ1FZZHBvUS90YjgKLS0tIGRCVXNNWmdJS0ZkNlNZbStPZWh4\n// N2FBNUJZdTFxMmYwVTEzUWwvTFVNeUkKrNZnrZjMlXvoCHz0FUS/bp9129XtSV1Q\n// 2twDjjAOwgBtBYoji9gKWgOG4w==\n// -----END AGE ENCRYPTED FILE-----\n\nconst d = new age.Decrypter()\nd.addIdentity(identity)\nconst decoded = age.armor.decode(armored)\nconst out = await d.decrypt(decoded, \"text\")\nconsole.log(out)\n```\n\n#### Encrypt and decrypt a file with a passphrase\n\n```ts\nimport { Encrypter, Decrypter } from \"age-encryption\"\n\nconst e = new Encrypter()\ne.setPassphrase(\"burst-swarm-slender-curve-ability-various-crystal-moon-affair-three\")\nconst ciphertext = await e.encrypt(\"Hello, age!\")\n\nconst d = new Decrypter()\nd.addPassphrase(\"burst-swarm-slender-curve-ability-various-crystal-moon-affair-three\")\nconst out = await d.decrypt(ciphertext, \"text\")\nconsole.log(out)\n```\n\n#### Encrypt and decrypt using the Streams API\n\nYou can also encrypt and decrypt [ReadableStreams][]. This can be useful for\nencrypting or decrypting large files, requests, or responses on the fly.\n\n[ReadableStreams]: https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream\n\n```ts\nimport { Encrypter, Decrypter } from \"age-encryption\"\n\nconst file = new File([new TextEncoder().encode(\"age\")], \"age.txt\")\n\nconst e = new Encrypter()\ne.setScryptWorkFactor(12)\ne.setPassphrase(\"light-original-energy-average-wish-blind-vendor-pencil-illness-scorpion\")\nconst encryptedStream = await e.encrypt(file.stream())\nconsole.log(encryptedStream.size(file.size))\n\nconst d = new Decrypter()\nd.addPassphrase(\"light-original-energy-average-wish-blind-vendor-pencil-illness-scorpion\")\nconst decryptedStream = await d.decrypt(encryptedStream)\nconsole.log(decryptedStream.size(encryptedStream.size(file.size)))\n\nconsole.log(await new Response(decryptedStream).text())\n```\n\n### Browser usage\n\n`age-encryption` is compatible with modern bundlers such as [esbuild](https://esbuild.github.io/).\n\nTo produce a classic library file that sets `age` as a global variable, you can run\n\n```sh\ncd \"$(mktemp -d)\" && npm init -y && npm install esbuild age-encryption\nnpx esbuild --target=es2022 --bundle --minify --outfile=age.js --global-name=age age-encryption\n```\n\nor download a pre-built one from the [Releases page](https://github.com/FiloSottile/typage/releases).\n\n<!-- TODO: why doesn't\n\n  npx --package esbuild --package age-encryption -- esbuild ...\n\nwork? It should run esbuild in an environment where age-encryption is available. -->\n\nThen, you can use it like this\n\n```html\n<script src=\"age.js\"></script>\n<script>\n(async () => {\n    const identity = await age.generateIdentity()\n    const recipient = await age.identityToRecipient(identity)\n    console.log(identity)\n    console.log(recipient)\n\n    const e = new age.Encrypter()\n    e.addRecipient(recipient)\n    const ciphertext = await e.encrypt(\"Hello, age!\")\n\n    const d = new age.Decrypter()\n    d.addIdentity(identity)\n    const out = await d.decrypt(ciphertext, \"text\")\n    console.log(out)\n})()\n</script>\n```\n\n#### Encrypt and decrypt a file with a passkey\n\nIn the browser, `age-encryption` supports *symmetric* encryption with passkeys,\ndiscoverable credentials that can be stored and synced by platforms (e.g. iCloud\nKeychain) or password managers (e.g. 1Password).\n\nThis functionality uses the WebAuthn PRF extension, which is supported by recent\nbrowsers and authenticators. When encrypting or decrypting a file, the user will\nbe prompted to select a passkey associated with the replying party ID (usually\nthe website origin). Passkeys not generated by `createCredential` can be used if\nthey have the `prf` extension enabled. The identity string returned by\n`createCredential` can be optionally provided at encryption/decryption time to\nprevent the user from selecting other passkeys.\n\n```ts\nawait age.webauthn.createCredential({ keyName: \"age encryption key 🦈\" })\n\nconst e = new age.Encrypter()\ne.addRecipient(new age.webauthn.WebAuthnRecipient())\nconst ciphertext = await e.encrypt(\"Hello, age!\")\nconst armored = age.armor.encode(ciphertext)\nconsole.log(armored)\n\nconst d = new age.Decrypter()\nd.addIdentity(new age.webauthn.WebAuthnIdentity())\nconst decoded = age.armor.decode(armored)\nconst out = await d.decrypt(decoded, \"text\")\nconsole.log(out)\n```\n\nEach encryption and decryption operation requires the authenticator and user\nconfirmation, there is no extractable key, and encrypted files can't be linked\nto an identity or to each other without the ability to decrypt them.\n\n#### Encrypt and decrypt a file with a security key\n\n`age-encryption` also supports non-discoverable FIDO2 credentials, usually\nuseful to encrypt files with hardware security keys (e.g. YubiKeys).\n\nEncryption and decryption work the same as with passkeys, but the identity\nstring is mandatory, because these credentials are not discoverable.\n\n```ts\nconst identity = await age.webauthn.createCredential({\n    type: \"security-key\", keyName: \"age encryption key\" })\nconsole.log(identity) // AGE-PLUGIN-FIDO2PRF-1...\n\nconst e = new age.Encrypter()\ne.addRecipient(new age.webauthn.WebAuthnRecipient({ identity: identity }))\nconst ciphertext = await e.encrypt(\"Hello, age!\")\nconst armored = age.armor.encode(ciphertext)\nconsole.log(armored)\n\nconst d = new age.Decrypter()\nd.addIdentity(new age.webauthn.WebAuthnIdentity({ identity: identity }))\nconst decoded = age.armor.decode(armored)\nconst out = await d.decrypt(decoded, \"text\")\nconsole.log(out)\n```\n\n##### age-plugin-fido2prf\n\nIf a credential is associated with a USB FIDO2 security key (e.g. a YubiKey),\nits identity string can be used outside the browser with the provided\n`age-plugin-fido2prf` plugin.\n\nFiles encrypted in the browser will decrypt from the CLI, and vice-versa. Since\nWebAuthn encryption is symmetric, there is no recipient encoding, only\nidentities. To encrypt to an identity, use `age -e -i`.\n\n```sh\ngo install filippo.io/typage/fido2prf/cmd/age-plugin-fido2prf@latest\n\ncat << EOF > identity.txt\nAGE-PLUGIN-FIDO2PRF-1Q9VGPY2E7S5FJJS3N7P03TZMMEJ94S6HYLDJLU8WVX2HP8SXQUGJUZ68LN6GP705662VS06UEX5J42W80NZT8Y2DQ8GTDN50VGATCNYLJ4HY2W5J67KYCTM858UFDCNUUDZ6U28WEMUKGVG9RNELRJDH8NFEP999Z8XFSS8XLS448A3TSQKWG9DMPL8ZCRRA02KSUC2UXTYDFNVYAE5KCMMRV9KXSMMNWJQKXATNVGTXV35G\nEOF\n\nage -d -i identity.txt << EOF\n-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IGFnZS1lbmNyeXB0aW9uLm9yZy9maWRv\nMnByZiBJSFFHd0poUkNSYThuVnB6b1R1bjdBClJ3d3dRUUtiRjN4TkU0VWx1SUZU\nWnJtTVBFUTZoR0d4eUx2WXFOSFBsQzQKLS0tIFNWVGRnNzV4L00wblRENUZyYlFh\nWU5wQmVsdG5hL0lmcXhTVzZHTVRtdFkK2rYiueXr8dgM1GiLVrBMC/LQRzkDacMw\nGEtVcMZyh7b90z6VR3KT92EIlA==\n-----END AGE ENCRYPTED FILE-----\nEOF\n```\n\nCredentials can be generated from the command line with `age-plugin-fido2prf\n-generate RPID`. Note that they will be usable inside the browser only if the\nrelying party ID matches the website's origin.\n\nAll the features of the plugin are also available as a Go library at\n[filippo.io/typage/fido2prf](https://pkg.go.dev/filippo.io/typage/fido2prf).\n\n#### Web Crypto identities\n\nYou can use a CryptoKey as an identity. It must have an `algorithm` of `X25519`,\nand support the `deriveBits` key usage. It doesn't need to be extractable.\n\n```ts\nconst keyPair = await crypto.subtle.generateKey({ name: \"X25519\" }, false, [\"deriveBits\"])\nconst identity = (keyPair as CryptoKeyPair).privateKey\nconst recipient = await age.identityToRecipient(identity)\nconsole.log(recipient)\n\nconst e = new age.Encrypter()\ne.addRecipient(recipient)\nconst file = await e.encrypt(\"age\")\n\nconst d = new age.Decrypter()\nd.addIdentity(identity)\nconst out = await d.decrypt(file, \"text\")\nconsole.log(out)\n```\n\n### Custom recipients and identities\n\nYou can implement the `Recipient` and `Identity` interfaces to use custom types\nas recipients and identities.\n\nThis lets you use use remote APIs and secrets managers to wrap files keys, and\ninteroperate with [age plugins](https://github.com/FiloSottile/awesome-age?tab=readme-ov-file#plugins).\n","readmeFilename":"README.md"}