{"_id":"@bernierllc/crypto-utils","_rev":"9-afbbd5024ea6284d4482c6e1c8c3679a","name":"@bernierllc/crypto-utils","dist-tags":{"latest":"1.4.0"},"versions":{"1.0.2":{"name":"@bernierllc/crypto-utils","version":"1.0.2","keywords":["api-key","cryptography","key-generation","security","authentication","uuid","random","crypto","jwt","magic-links","hashing","tokens","bernierllc"],"author":{"name":"Bernier LLC"},"license":"MIT","_id":"@bernierllc/crypto-utils@1.0.2","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"homepage":"https://github.com/bernier-llc/tools#readme","bugs":{"url":"https://github.com/bernier-llc/tools/issues"},"dist":{"shasum":"0d4a02ace940c4449a0bc630bb7f342e778abe4d","tarball":"https://registry.npmjs.org/@bernierllc/crypto-utils/-/crypto-utils-1.0.2.tgz","fileCount":51,"integrity":"sha512-a4BAQNuRY+rLfvTP//crZCr0y9F57RJWfYLR6+csQdO1fBOl423BKLGASacL0neAksDQ0xpo2+YA/Cg3eblU1g==","signatures":[{"sig":"MEQCIC9oUHIVQ/Dt/CjgQc1jq7mmGhSIXRJlVRXcSVxyp0UdAiBY2aWzWgN6m/vjKbuKedLSKEbcVZFS0rz1mRLGPzMctg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":180114},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"969f3247d3fc80336e12b3a55179033e5376a6b4","scripts":{"dev":"tsc --watch","lint":"eslint src/**/*.ts","test":"jest","build":"tsc","clean":"rimraf dist","test:run":"jest --passWithNoTests","test:watch":"jest --watch","test:coverage":"jest --coverage"},"_npmUser":{"name":"mkbernier","email":"mkbernier@gmail.com"},"repository":{"url":"git+https://github.com/bernier-llc/tools.git","type":"git"},"_npmVersion":"11.4.2","description":"Comprehensive cryptographic utilities including key generation, JWT tokens, magic links, and secure hashing for BernierLLC ecosystem","directories":{},"_nodeVersion":"24.4.1","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","eslint":"^8.0.0","rimraf":"^5.0.0","ts-jest":"^29.4.0","typescript":"^5.0.0","@types/jest":"^29.5.14","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/crypto-utils_1.0.2_1756487994366_0.7290099129386713","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@bernierllc/crypto-utils","version":"1.0.4","keywords":["api-key","cryptography","key-generation","security","authentication","uuid","random","crypto","jwt","magic-links","hashing","tokens","bernierllc"],"author":{"name":"Bernier LLC"},"license":"MIT","_id":"@bernierllc/crypto-utils@1.0.4","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"homepage":"https://github.com/bernier-llc/tools#readme","bugs":{"url":"https://github.com/bernier-llc/tools/issues"},"dist":{"shasum":"c0186f92c76266e223790f03f92c0e269e1fa161","tarball":"https://registry.npmjs.org/@bernierllc/crypto-utils/-/crypto-utils-1.0.4.tgz","fileCount":39,"integrity":"sha512-IJQUghgGnCSffieO4UqoOXIADhiifmQYxZpomLxBaUovxB/8WU7XgDJJg7QP8yMZ4iPCa458+1i2WTJpGBopTg==","signatures":[{"sig":"MEUCIQDe8RtkdKmUf9ddOaCABiiJFspzcGwF7nUympjJt5z8nAIgV5PYcneNuxh6YPnMVDuD7CT3ejOheI8TYijCWC8OsYc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":135031},"main":"dist/index.js","_from":"file:bernierllc-crypto-utils-1.0.4.tgz","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"scripts":{"dev":"tsc --watch","lint":"eslint src/**/*.ts","test":"jest","build":"tsc","clean":"rimraf dist","test:run":"jest --watchAll=false","test:watch":"jest --watch","test:coverage":"jest --coverage"},"_npmUser":{"name":"mkbernier","email":"mkbernier@gmail.com"},"_resolved":"/tmp/de9dd67bbbbc0a11609b5f4c343250ce/bernierllc-crypto-utils-1.0.4.tgz","_integrity":"sha512-IJQUghgGnCSffieO4UqoOXIADhiifmQYxZpomLxBaUovxB/8WU7XgDJJg7QP8yMZ4iPCa458+1i2WTJpGBopTg==","repository":{"url":"git+https://github.com/bernier-llc/tools.git","type":"git"},"_npmVersion":"11.7.0","description":"Comprehensive cryptographic utilities including key generation, JWT tokens, magic links, and secure hashing for BernierLLC ecosystem","directories":{},"_nodeVersion":"20.19.6","dependencies":{},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","eslint":"^8.0.0","rimraf":"^5.0.0","ts-jest":"^29.4.0","typescript":"^5.0.0","@types/jest":"^29.5.14","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/crypto-utils_1.0.4_1766283485076_0.41001093752109563","host":"s3://npm-registry-packages-npm-production"}},"1.0.6":{"name":"@bernierllc/crypto-utils","version":"1.0.6","keywords":["api-key","cryptography","key-generation","security","authentication","uuid","random","crypto","jwt","magic-links","hashing","tokens","bernierllc"],"author":{"name":"Bernier LLC"},"license":"MIT","_id":"@bernierllc/crypto-utils@1.0.6","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"homepage":"https://github.com/bernier-llc/tools#readme","bugs":{"url":"https://github.com/bernier-llc/tools/issues"},"dist":{"shasum":"a410da5057e53d0d346a9576f4c34dff573ea168","tarball":"https://registry.npmjs.org/@bernierllc/crypto-utils/-/crypto-utils-1.0.6.tgz","fileCount":39,"integrity":"sha512-i/vuJWyUyB4rAWwnGzobCMaPu1K+FmWtB3aKRPrI5cVfujQ9L2ncGlIjnjtzqE85634BufWfE6xyOFIqpg+02Q==","signatures":[{"sig":"MEUCIQDADr9PjIj8S+vd6UAxXLXzVz9pM/yNsqa2u8YqL63uygIgTliFuml11SPQYWFBb0k0MAUcSI9/dfA9cz4vYgvbcK0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":135067},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"af7e74b3715d56d3a193e1bb6743b337c2b0df6d","scripts":{"dev":"tsc --watch","lint":"eslint src/**/*.ts","test":"jest","build":"tsc","clean":"rimraf dist","test:run":"jest --watchAll=false","test:watch":"jest --watch","test:coverage":"jest --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:92d9f9f1-cf53-44b2-aaa8-6e5db836c803"}},"repository":{"url":"git+https://github.com/bernier-llc/tools.git","type":"git"},"_npmVersion":"lerna/9.0.3/node@v20.19.6+x64 (linux)","description":"Comprehensive cryptographic utilities including key generation, JWT tokens, magic links, and secure hashing for BernierLLC ecosystem","directories":{},"_nodeVersion":"20.19.6","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","eslint":"^8.0.0","rimraf":"^5.0.0","ts-jest":"^29.4.0","typescript":"^5.0.0","@types/jest":"^29.5.14","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/crypto-utils_1.0.6_1767642295124_0.8799514612827348","host":"s3://npm-registry-packages-npm-production"}},"1.0.7":{"name":"@bernierllc/crypto-utils","version":"1.0.7","keywords":["api-key","cryptography","key-generation","security","authentication","uuid","random","crypto","jwt","magic-links","hashing","tokens","bernierllc"],"author":{"name":"Bernier LLC"},"license":"MIT","_id":"@bernierllc/crypto-utils@1.0.7","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"homepage":"https://github.com/bernier-llc/tools#readme","bugs":{"url":"https://github.com/bernier-llc/tools/issues"},"dist":{"shasum":"9675b1c5a4ef96a13636174d47778918168ba329","tarball":"https://registry.npmjs.org/@bernierllc/crypto-utils/-/crypto-utils-1.0.7.tgz","fileCount":39,"integrity":"sha512-THxThmQDL+GBp7CVcR/m3/2NUNyf2eQz6GKkNPw2RdJ1GJlnuEmpLMeeHvkjmm981ODzgBBnDFJJ1yoNDVZVuw==","signatures":[{"sig":"MEYCIQDBMms737Dm1XcS+aCS4mIsQVStmvkocTA5gjhMviE4aQIhAJLFxwIYDuWp0IVoEPGVD/RfktSDOGZLZL8eR//8RwJ4","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":135009},"main":"dist/index.js","_from":"file:bernierllc-crypto-utils-1.0.7.tgz","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"scripts":{"dev":"tsc --watch","lint":"eslint src/**/*.ts","test":"jest","build":"tsc","clean":"rimraf dist","test:run":"jest --watchAll=false","test:watch":"jest --watch","test:coverage":"jest --coverage"},"_npmUser":{"name":"mkbernier","email":"mkbernier@gmail.com"},"_resolved":"/Users/mattbernier/projects/tools/packages/core/crypto-utils/bernierllc-crypto-utils-1.0.7.tgz","_integrity":"sha512-THxThmQDL+GBp7CVcR/m3/2NUNyf2eQz6GKkNPw2RdJ1GJlnuEmpLMeeHvkjmm981ODzgBBnDFJJ1yoNDVZVuw==","repository":{"url":"git+https://github.com/bernier-llc/tools.git","type":"git"},"_npmVersion":"11.6.2","description":"Comprehensive cryptographic utilities including key generation, JWT tokens, magic links, and secure hashing for BernierLLC ecosystem","directories":{},"_nodeVersion":"25.2.1","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","eslint":"^8.0.0","rimraf":"^5.0.0","ts-jest":"^29.4.0","typescript":"^5.0.0","@types/jest":"^29.5.14","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/crypto-utils_1.0.7_1772567064827_0.5875839337396056","host":"s3://npm-registry-packages-npm-production"}},"1.0.8":{"name":"@bernierllc/crypto-utils","version":"1.0.8","keywords":["api-key","cryptography","key-generation","security","authentication","uuid","random","crypto","jwt","magic-links","hashing","tokens","bernierllc"],"author":{"name":"Bernier LLC"},"license":"MIT","_id":"@bernierllc/crypto-utils@1.0.8","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"homepage":"https://github.com/bernier-llc/tools#readme","bugs":{"url":"https://github.com/bernier-llc/tools/issues"},"dist":{"shasum":"0d4cb7526ce6d46f37b8b1ee2aac48cd1197dec2","tarball":"https://registry.npmjs.org/@bernierllc/crypto-utils/-/crypto-utils-1.0.8.tgz","fileCount":39,"integrity":"sha512-Cl/o8Pgk+JdOPPFOaal4BpahGWDx8z3vg8NvK62Ou5LoO2gDvoAJ+i8jq6uFUlef3cBamxv8bonQMZbBk38n4A==","signatures":[{"sig":"MEQCIF5EclcDNER/d7ULCjC+AdvZyZIUWtFgakDZLV0xo38FAiA696Scw2G2uU7lZUrZXExCJlOzrRpJP8GEw1r/UPCATA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":135009},"main":"dist/index.js","_from":"file:bernierllc-crypto-utils-1.0.8.tgz","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"scripts":{"dev":"tsc --watch","lint":"eslint src/**/*.ts","test":"jest","build":"tsc","clean":"rimraf dist","test:run":"jest --watchAll=false","test:watch":"jest --watch","test:coverage":"jest --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:92d9f9f1-cf53-44b2-aaa8-6e5db836c803"}},"_resolved":"/tmp/8b656a874c12792e026593778af9d4f9/bernierllc-crypto-utils-1.0.8.tgz","_integrity":"sha512-Cl/o8Pgk+JdOPPFOaal4BpahGWDx8z3vg8NvK62Ou5LoO2gDvoAJ+i8jq6uFUlef3cBamxv8bonQMZbBk38n4A==","repository":{"url":"git+https://github.com/bernier-llc/tools.git","type":"git"},"_npmVersion":"11.11.0","description":"Comprehensive cryptographic utilities including key generation, JWT tokens, magic links, and secure hashing for BernierLLC ecosystem","directories":{},"_nodeVersion":"20.20.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","eslint":"^8.0.0","rimraf":"^5.0.0","ts-jest":"^29.4.0","typescript":"^5.0.0","@types/jest":"^29.5.14","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/crypto-utils_1.0.8_1773081156915_0.14180574308698168","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@bernierllc/crypto-utils","version":"1.2.0","keywords":["api-key","cryptography","key-generation","security","authentication","uuid","random","crypto","jwt","magic-links","hashing","tokens","bernierllc"],"author":{"name":"Bernier LLC"},"license":"MIT","_id":"@bernierllc/crypto-utils@1.2.0","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"homepage":"https://github.com/bernier-llc/tools#readme","bugs":{"url":"https://github.com/bernier-llc/tools/issues"},"dist":{"shasum":"41847e274c602d8a6ee67e5d988cb3387e9d714e","tarball":"https://registry.npmjs.org/@bernierllc/crypto-utils/-/crypto-utils-1.2.0.tgz","fileCount":43,"integrity":"sha512-zmrUKre9RKJOMu3hGWrABSP2pn+4VPvcvFK/y0htsGrtmS3jY2FADA66O0XtzQllfwwIGYS7Lc9sQeWfs0n1kw==","signatures":[{"sig":"MEQCIDJpTZajTcm59exa8X1zErvVlKsg6BHbXa+38Pbd4GAfAiAboz7yrGFmaaRzVFZCy1KcIxEhHgKMfTyM3r7WfuJrhQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":141292},"main":"dist/index.js","_from":"file:bernierllc-crypto-utils-1.2.0.tgz","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"scripts":{"dev":"tsc --watch","lint":"eslint src/**/*.ts","test":"jest","build":"tsc","clean":"rimraf dist","test:run":"jest --watchAll=false","test:watch":"jest --watch","test:coverage":"jest --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:92d9f9f1-cf53-44b2-aaa8-6e5db836c803"}},"_resolved":"/home/runner/work/tools/tools/packages/core/crypto-utils/bernierllc-crypto-utils-1.2.0.tgz","_integrity":"sha512-zmrUKre9RKJOMu3hGWrABSP2pn+4VPvcvFK/y0htsGrtmS3jY2FADA66O0XtzQllfwwIGYS7Lc9sQeWfs0n1kw==","repository":{"url":"git+https://github.com/bernier-llc/tools.git","type":"git"},"_npmVersion":"11.14.1","description":"Comprehensive cryptographic utilities including key generation, JWT tokens, magic links, and secure hashing for BernierLLC ecosystem","directories":{},"_nodeVersion":"20.20.2","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","eslint":"^8.0.0","rimraf":"^5.0.0","ts-jest":"^29.4.0","typescript":"^5.0.0","@types/jest":"^29.5.14","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/crypto-utils_1.2.0_1779221274346_0.2974746118053453","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"@bernierllc/crypto-utils","version":"1.3.0","keywords":["api-key","cryptography","key-generation","security","authentication","uuid","random","crypto","jwt","magic-links","hashing","tokens","bernierllc"],"author":{"name":"Bernier LLC"},"license":"MIT","_id":"@bernierllc/crypto-utils@1.3.0","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"homepage":"https://github.com/bernier-llc/tools#readme","bugs":{"url":"https://github.com/bernier-llc/tools/issues"},"dist":{"shasum":"cebec3db7cac64d66fca2d575afeed491984a71e","tarball":"https://registry.npmjs.org/@bernierllc/crypto-utils/-/crypto-utils-1.3.0.tgz","fileCount":43,"integrity":"sha512-hoU11KADMUTyHoSSKQd6vfxUeI/bq766hbjp4WYVo596wA/oXaAp6YHBVLUbvxdkVeBbTYGNhC80gjVAYAsq4Q==","signatures":[{"sig":"MEUCIQCxgCeGkl/SqlZQEOFnsn4Nrx+cPQoeSrU+9E+ri62ceAIgNq31WEt56Oyil+/jBi48TlAFkqefmvr0zV7NpBFSqXM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":141292},"main":"dist/index.js","_from":"file:bernierllc-crypto-utils-1.3.0.tgz","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"scripts":{"dev":"tsc --watch","lint":"eslint src/**/*.ts","test":"jest","build":"tsc","clean":"rimraf dist","test:run":"jest --watchAll=false","test:watch":"jest --watch","test:coverage":"jest --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:92d9f9f1-cf53-44b2-aaa8-6e5db836c803"}},"_resolved":"/home/runner/work/tools/tools/packages/core/crypto-utils/bernierllc-crypto-utils-1.3.0.tgz","_integrity":"sha512-hoU11KADMUTyHoSSKQd6vfxUeI/bq766hbjp4WYVo596wA/oXaAp6YHBVLUbvxdkVeBbTYGNhC80gjVAYAsq4Q==","repository":{"url":"git+https://github.com/bernier-llc/tools.git","type":"git"},"_npmVersion":"11.14.1","description":"Comprehensive cryptographic utilities including key generation, JWT tokens, magic links, and secure hashing for BernierLLC ecosystem","directories":{},"_nodeVersion":"20.20.2","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","eslint":"^8.0.0","rimraf":"^5.0.0","ts-jest":"^29.4.0","typescript":"^5.0.0","@types/jest":"^29.5.14","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/crypto-utils_1.3.0_1779241074577_0.847891921485489","host":"s3://npm-registry-packages-npm-production"}},"1.4.0":{"name":"@bernierllc/crypto-utils","version":"1.4.0","description":"Comprehensive cryptographic utilities including key generation, JWT tokens, magic links, and secure hashing for BernierLLC ecosystem","main":"dist/index.js","types":"dist/index.d.ts","keywords":["api-key","cryptography","key-generation","security","authentication","uuid","random","crypto","jwt","magic-links","hashing","tokens","bernierllc"],"author":{"name":"Bernier LLC"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/bernier-llc/tools.git"},"devDependencies":{"@types/jest":"^29.5.14","@types/node":"^20.0.0","eslint":"^8.0.0","jest":"^29.5.0","rimraf":"^5.0.0","ts-jest":"^29.4.0","typescript":"^5.0.0"},"engines":{"node":">=18.0.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"scripts":{"build":"tsc","dev":"tsc --watch","test":"jest","test:run":"jest --watchAll=false","test:watch":"jest --watch","test:coverage":"jest --coverage","lint":"eslint src/**/*.ts","clean":"rimraf dist"},"_id":"@bernierllc/crypto-utils@1.4.0","bugs":{"url":"https://github.com/bernier-llc/tools/issues"},"homepage":"https://github.com/bernier-llc/tools#readme","_integrity":"sha512-yzAS0M5eWQINTYc54Z/YfH8tGA9R80aSYLREcWyMbKlZhGibR3HByWD6YbwTH59lQHyzNjKYl2HPtxWgL02tZA==","_resolved":"/home/runner/work/tools/tools/packages/core/crypto-utils/bernierllc-crypto-utils-1.4.0.tgz","_from":"file:bernierllc-crypto-utils-1.4.0.tgz","_nodeVersion":"20.20.2","_npmVersion":"11.14.1","dist":{"integrity":"sha512-yzAS0M5eWQINTYc54Z/YfH8tGA9R80aSYLREcWyMbKlZhGibR3HByWD6YbwTH59lQHyzNjKYl2HPtxWgL02tZA==","shasum":"573f31395bf355a05d62280d382c4725464d27d3","tarball":"https://registry.npmjs.org/@bernierllc/crypto-utils/-/crypto-utils-1.4.0.tgz","fileCount":43,"unpackedSize":141292,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEO+cFLXWdgB1+SwVqiCG7sqQr2BsxDEDhCkj5ocKoiiAiBnyFOd7Np7uEbsoWqkDo2v9ZzYpgNDy71EHXGDE/Pg+A=="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:92d9f9f1-cf53-44b2-aaa8-6e5db836c803"}},"directories":{},"maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/crypto-utils_1.4.0_1779249817090_0.9495733894521163"},"_hasShrinkwrap":false}},"time":{"created":"2025-08-29T17:19:53.954Z","modified":"2026-05-20T04:03:37.372Z","1.0.2":"2025-08-29T17:19:54.569Z","1.0.4":"2025-12-21T02:18:05.209Z","1.0.6":"2026-01-05T19:44:55.266Z","1.0.7":"2026-03-03T19:44:24.957Z","1.0.8":"2026-03-09T18:32:37.089Z","1.2.0":"2026-05-19T20:07:54.502Z","1.3.0":"2026-05-20T01:37:54.724Z","1.4.0":"2026-05-20T04:03:37.243Z"},"bugs":{"url":"https://github.com/bernier-llc/tools/issues"},"author":{"name":"Bernier LLC"},"license":"MIT","homepage":"https://github.com/bernier-llc/tools#readme","keywords":["api-key","cryptography","key-generation","security","authentication","uuid","random","crypto","jwt","magic-links","hashing","tokens","bernierllc"],"repository":{"type":"git","url":"git+https://github.com/bernier-llc/tools.git"},"description":"Comprehensive cryptographic utilities including key generation, JWT tokens, magic links, and secure hashing for BernierLLC ecosystem","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"readme":"# @bernierllc/crypto-utils\n\nComprehensive cryptographic utilities including key generation, JWT tokens, magic links, and secure hashing for modern applications.\n\n## Installation\n\n```bash\nnpm install @bernierllc/crypto-utils\n```\n\n## Quick Start\n\n```typescript\nimport { \n  generateApiKey, \n  generateAccessToken, \n  generateEmailMagicLink,\n  verifyJWT,\n  constantTimeCompare \n} from '@bernierllc/crypto-utils';\n\n// Generate an API key with sensible defaults\nconst apiKey = await generateApiKey();\nconsole.log(apiKey); // ak_a1b2c3d4e5f6...\n\n// Generate JWT access token\nconst accessToken = generateAccessToken({ \n  sub: 'user123', \n  email: 'user@example.com' \n}, 'your-secret');\n\n// Generate magic link for email authentication\nconst magicLink = generateEmailMagicLink('user123', 'user@example.com', 'your-secret');\n\n// Secure password verification\nconst isValid = constantTimeCompare(providedPassword, storedPasswordHash);\n```\n\n## Core Features\n\n### 🔐 Key Generation\n- **Multiple Algorithms**: Random bytes, UUID v4, custom patterns\n- **Multiple Encodings**: Hex, Base64, Base58 (Bitcoin-style)\n- **Security Features**: Entropy validation, collision detection, safe hashing\n\n### 🎟️ JWT Tokens\n- **Standards Compliant**: RFC 7519 JWT implementation\n- **Multiple Algorithms**: HS256, HS384, HS512\n- **Claims Validation**: Expiration, issuer, audience, subject\n\n### ✉️ Magic Links\n- **Email Authentication**: Secure passwordless login\n- **Password Reset**: Time-limited reset tokens\n- **URL-Safe**: Base64URL encoding for web compatibility\n- **TOTP Support**: Time-based one-time passwords\n\n### 🛡️ Security Utilities\n- **Constant-Time Comparison**: Prevent timing attacks\n- **Password Verification**: Secure hash validation\n- **Token Validation**: Comprehensive security checks\n\n## API Reference\n\n## Key Generation\n\n### Core Generation Functions\n\n#### `generateRandomKey(options?)`\n\nGenerate cryptographically secure random keys using `crypto.randomBytes`.\n\n```typescript\nimport { generateRandomKey } from '@bernierllc/crypto-utils';\n\nconst result = await generateRandomKey({\n  length: 32,           // Key length in bytes\n  prefix: 'ak_',        // Optional prefix\n  encoding: 'hex',      // 'hex' | 'base64' | 'base58'\n  validateEntropy: true, // Validate entropy requirements\n  minEntropyBits: 128,  // Minimum entropy in bits\n  checkUnique: async (key) => !await db.keyExists(key), // Collision check\n  maxRetries: 5         // Max collision retry attempts\n});\n\nconsole.log(result.key);      // Generated key string\nconsole.log(result.entropy);  // Estimated entropy in bits\nconsole.log(result.metadata); // Generation metadata\n```\n\n### Convenience Functions\n\nPre-configured key generators with sensible defaults:\n\n```typescript\nimport { \n  generateApiKey,       // ak_ + 32 bytes + hex\n  generateSecretKey,    // sk_ + 48 bytes + base64  \n  generateSessionToken, // sess_ + UUID + base58\n  generateLicenseKey    // lic_ + pattern XXXX-XXXX-XXXX-XXXX\n} from '@bernierllc/crypto-utils';\n\nconst apiKey = await generateApiKey();          // ak_a1b2c3...\nconst secret = await generateSecretKey();       // sk_SGVsbG8...\nconst session = await generateSessionToken();   // sess_23456789...\nconst license = await generateLicenseKey();     // lic_A1B2-C3D4...\n```\n\n## JWT Tokens\n\n### Token Generation\n\n#### `generateJWT(payload, secret, options?)`\n\nGenerate signed JWT tokens with custom claims.\n\n```typescript\nimport { generateJWT } from '@bernierllc/crypto-utils';\n\nconst token = generateJWT({\n  sub: 'user123',\n  email: 'user@example.com',\n  role: 'admin'\n}, 'your-jwt-secret', {\n  algorithm: 'HS256',     // HS256 | HS384 | HS512\n  expiresIn: 3600,        // 1 hour in seconds\n  issuer: 'your-app',\n  audience: 'api',\n  includeIssuedAt: true   // Include iat claim\n});\n```\n\n#### `verifyJWT(token, secret, options?)`\n\nVerify and validate JWT tokens.\n\n```typescript\nimport { verifyJWT } from '@bernierllc/crypto-utils';\n\nconst result = verifyJWT(token, 'your-jwt-secret', {\n  issuer: 'your-app',      // Expected issuer\n  audience: 'api',         // Expected audience\n  clockTolerance: 30,      // Allow 30 seconds clock skew\n  ignoreExpiration: false  // Enforce expiration\n});\n\nif (result.valid) {\n  console.log('User:', result.payload?.sub);\n  console.log('Expires in:', result.expiresIn, 'seconds');\n} else {\n  console.error('Invalid token:', result.error);\n}\n```\n\n### Convenience Token Functions\n\n```typescript\nimport { \n  generateAccessToken,  // 1 hour expiry, HS256\n  generateRefreshToken, // 7 days expiry, HS256\n} from '@bernierllc/crypto-utils';\n\n// Generate access token (1 hour expiry)\nconst accessToken = generateAccessToken({\n  sub: 'user123',\n  email: 'user@example.com'\n}, 'your-secret');\n\n// Generate refresh token (7 days expiry)\nconst refreshToken = generateRefreshToken({\n  sub: 'user123'\n}, 'your-secret');\n```\n\n## Magic Links\n\n### Email Authentication Links\n\n#### `generateMagicLink(userId, email, secret, options?)`\n\nGenerate secure magic links for passwordless authentication.\n\n```typescript\nimport { generateMagicLink } from '@bernierllc/crypto-utils';\n\nconst result = generateMagicLink('user123', 'user@example.com', 'your-secret', {\n  expirationMinutes: 15,  // Link expires in 15 minutes\n  action: 'login',        // Action type\n  customData: {           // Additional data\n    ip: '192.168.1.1',\n    userAgent: 'Mozilla/5.0...'\n  }\n});\n\nconst magicUrl = `https://yourapp.com/auth/verify?token=${result.token}`;\nconsole.log('Magic link expires at:', new Date(result.expiresAt));\n```\n\n#### `verifyMagicLink(token, secret, options?)`\n\nVerify magic link tokens.\n\n```typescript\nimport { verifyMagicLink } from '@bernierllc/crypto-utils';\n\nconst result = verifyMagicLink(token, 'your-secret');\n\nif (result.valid) {\n  console.log('User ID:', result.payload?.userId);\n  console.log('Email:', result.payload?.email);\n  console.log('Action:', result.payload?.action);\n  console.log('Remaining time:', result.remainingMinutes, 'minutes');\n  \n  // Authenticate user\n  await authenticateUser(result.payload.userId);\n} else {\n  console.error('Invalid magic link:', result.error);\n}\n```\n\n### Convenience Magic Link Functions\n\n```typescript\nimport { \n  generateEmailMagicLink,    // 15 min expiry, email_auth action\n  generatePasswordResetLink  // 30 min expiry, password_reset action\n} from '@bernierllc/crypto-utils';\n\n// Email verification link\nconst emailLink = generateEmailMagicLink('user123', 'user@example.com', 'secret');\n\n// Password reset link  \nconst resetLink = generatePasswordResetLink('user123', 'user@example.com', 'secret');\n```\n\n### One-Time Passwords (OTP)\n\n```typescript\nimport { generateOTP, generateTOTP, verifyTOTP } from '@bernierllc/crypto-utils';\n\n// Simple numeric OTP\nconst otp = generateOTP(6); // 123456\n\n// Time-based OTP (Google Authenticator compatible)\nconst secret = '48656c6c6f21deadbeef'; // Hex-encoded secret\nconst totp = generateTOTP(secret, {\n  timeStep: 30,    // 30-second windows\n  digits: 6,       // 6-digit codes\n  algorithm: 'sha1' // sha1 | sha256 | sha512\n});\n\n// Verify TOTP code\nconst isValid = verifyTOTP(userProvidedCode, secret, {\n  window: 1 // Allow ±1 time window (90 seconds total)\n});\n```\n\n## Security Utilities\n\n### Constant-Time Comparison\n\nPrevent timing attacks when comparing sensitive values.\n\n```typescript\nimport { \n  constantTimeCompare,\n  constantTimeCompareHex,\n  validateSecureToken\n} from '@bernierllc/crypto-utils';\n\n// Basic constant-time string comparison\nconst isMatch = constantTimeCompare(providedToken, expectedToken);\n\n// Hex comparison (case-insensitive)  \nconst hexMatch = constantTimeCompareHex('deadbeef', 'DEADBEEF'); // true\n\n// Secure token validation with options\nconst isValid = validateSecureToken(providedToken, expectedToken, {\n  caseSensitive: false,  // Case-insensitive comparison\n  trimWhitespace: true,  // Trim whitespace\n  maxLength: 1000        // Maximum token length\n});\n```\n\n### Password Hash Verification\n\n```typescript\nimport { verifyPasswordHash } from '@bernierllc/crypto-utils';\n\n// Custom hash function (use bcrypt, scrypt, etc. in production)\nconst hashPassword = (password: string) => {\n  return crypto.createHash('sha256').update(password + 'salt').digest('hex');\n};\n\nconst isValidPassword = verifyPasswordHash(\n  providedPassword,\n  storedPasswordHash,\n  hashPassword\n);\n```\n\n### Timing-Safe Array Operations\n\n```typescript\nimport { timingSafeIncludes } from '@bernierllc/crypto-utils';\n\nconst allowedTokens = ['token1', 'token2', 'token3'];\nconst isAllowed = timingSafeIncludes(allowedTokens, userToken);\n```\n\n## Complete Authentication Flow Example\n\n```typescript\nimport {\n  generateEmailMagicLink,\n  verifyMagicLink,\n  generateAccessToken,\n  generateRefreshToken,\n  verifyJWT\n} from '@bernierllc/crypto-utils';\n\nconst JWT_SECRET = process.env.JWT_SECRET!;\nconst MAGIC_SECRET = process.env.MAGIC_SECRET!;\n\n// Step 1: Send magic link via email\nasync function sendMagicLink(email: string) {\n  const user = await getUserByEmail(email);\n  if (!user) throw new Error('User not found');\n  \n  const magicLink = generateEmailMagicLink(user.id, email, MAGIC_SECRET, {\n    expirationMinutes: 10\n  });\n  \n  const url = `https://app.com/auth/verify?token=${magicLink.token}`;\n  await sendEmail(email, 'Login to Your Account', `Click: ${url}`);\n}\n\n// Step 2: Verify magic link and issue tokens\nasync function verifyMagicLinkAndIssueTokens(token: string) {\n  const verification = verifyMagicLink(token, MAGIC_SECRET);\n  \n  if (!verification.valid) {\n    throw new Error(`Invalid magic link: ${verification.error}`);\n  }\n  \n  const userId = verification.payload!.userId;\n  const user = await getUserById(userId);\n  \n  const accessToken = generateAccessToken({\n    sub: userId,\n    email: user.email,\n    role: user.role\n  }, JWT_SECRET);\n  \n  const refreshToken = generateRefreshToken({\n    sub: userId\n  }, JWT_SECRET);\n  \n  return { accessToken, refreshToken, user };\n}\n\n// Step 3: Validate API requests\nasync function authenticateRequest(authHeader: string) {\n  const token = authHeader.replace('Bearer ', '');\n  const verification = verifyJWT(token, JWT_SECRET);\n  \n  if (!verification.valid) {\n    throw new Error(`Authentication failed: ${verification.error}`);\n  }\n  \n  return verification.payload;\n}\n```\n\n## Security Best Practices\n\n### Key Generation\n- **Minimum 128 bits** of entropy for production keys\n- Use `generateRandomKey()` for maximum entropy\n- Implement collision checking with `checkUnique`\n\n### JWT Security\n- **Use strong secrets** (256+ bits of entropy)\n- **Short expiration times** for access tokens (15-60 minutes)\n- **Validate all claims** (exp, iss, aud, etc.)\n- **Use HTTPS only** for token transmission\n\n### Magic Link Security\n- **Short expiration times** (5-15 minutes for login, 30 minutes for password reset)\n- **Single use only** - invalidate after verification\n- **Rate limiting** - prevent magic link spam\n- **HTTPS required** - never send over HTTP\n\n### Constant-Time Operations\n- **Always use for passwords** and sensitive tokens\n- **Use for session validation** and API key checking\n- **Avoid string length leaks** in error messages\n\n### General Security\n- **Never log secrets** or tokens in production\n- **Use environment variables** for secrets\n- **Implement proper key rotation** policies\n- **Use HTTPS everywhere** for token transmission\n\n## Error Handling\n\n```typescript\nimport { generateJWT, verifyJWT, generateMagicLink } from '@bernierllc/crypto-utils';\n\ntry {\n  // Token generation\n  const token = generateJWT(payload, secret);\n  \n  // Token verification\n  const result = verifyJWT(token, secret);\n  if (!result.valid) {\n    // Handle specific errors\n    if (result.error?.includes('expired')) {\n      console.log('Token expired, refresh required');\n    } else if (result.error?.includes('signature')) {\n      console.log('Invalid token signature');\n    }\n  }\n  \n  // Magic link generation\n  const magicLink = generateMagicLink(userId, email, secret, {\n    expirationMinutes: 5\n  });\n  \n} catch (error) {\n  console.error('Crypto operation failed:', error.message);\n}\n```\n\n## TypeScript Support\n\nFull TypeScript support with comprehensive type definitions:\n\n```typescript\nimport type { \n  // Key generation types\n  KeyOptions, \n  GenerationResult, \n  ValidationResult,\n  KeyEncoding,\n  KeyAlgorithm,\n  \n  // JWT types\n  JWTPayload,\n  JWTOptions,\n  JWTVerifyResult,\n  \n  // Magic link types\n  MagicLinkOptions,\n  MagicLinkResult,\n  MagicLinkVerifyResult\n} from '@bernierllc/crypto-utils';\n\n// Strongly typed JWT payload\nconst payload: JWTPayload = {\n  sub: 'user123',\n  email: 'user@example.com',\n  exp: Math.floor(Date.now() / 1000) + 3600\n};\n\n// Strongly typed options\nconst keyOptions: KeyOptions = {\n  length: 32,\n  encoding: 'hex',\n  validateEntropy: true\n};\n```\n\n## Performance\n\n- **High throughput**: >10,000 operations/second\n- **Efficient encoding**: Optimized implementations\n- **Minimal dependencies**: Zero runtime dependencies\n- **Memory efficient**: Streaming operations where possible\n\n## Migration from @bernierllc/api-key-generator\n\nThe package maintains full backward compatibility:\n\n```typescript\n// All existing imports continue to work\nimport { \n  generateApiKey,\n  generateSecretKey,\n  generateRandomKey,\n  validateKeyFormat\n} from '@bernierllc/crypto-utils'; // was @bernierllc/api-key-generator\n```\n\n## License\n\nMIT License - Copyright (c) 2025 Bernier LLC\n\n## See Also\n\n- [@bernierllc/logger](../logger) - Structured logging (never logs secrets)\n- [@bernierllc/neverhub-adapter](../neverhub-adapter) - Service discovery integration","readmeFilename":"README.md"}