{"_id":"ncrypt-js","_rev":"10-78324b44cc6fb2e5bc65e35b168dc74c","name":"ncrypt-js","dist-tags":{"latest":"2.3.0"},"versions":{"1.0.0":{"name":"ncrypt-js","version":"1.0.0","keywords":["ncrypt-js","crypto","cipher","decrypt","encrypt","typescript","ecmascript5","encryption","cryptojs","cryptography","decryption","javascript-library"],"author":{"name":"meeky"},"license":"MIT","_id":"ncrypt-js@1.0.0","maintainers":[{"name":"ajimae","email":"meeky.ae@gmail.com"}],"homepage":"https://github.com/ajimae/ncrypt-js#readme","bugs":{"url":"https://github.com/ajimae/ncrypt-js/issues"},"dist":{"shasum":"34f3c6da9202127a933e93562e3d51fb900a92da","tarball":"https://registry.npmjs.org/ncrypt-js/-/ncrypt-js-1.0.0.tgz","fileCount":17,"integrity":"sha512-sI0bIx5/IlaHa/9CV75FCFPWVGl+HO9M+1TvybgIq+AnMSJgGODt8DUdqkJZwXuepgT9Gn3bI7ky8uD0cRAaMA==","signatures":[{"sig":"MEQCICGb9cy+GXXni1PY4HfLUHufTp4sp1zInViIAKYAiC5RAiBTeTSJeLn64f67ugzn0CTJ0H8elpqL2ZJkEeQK6FhyAg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32782,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZayWCRA9TVsSAnZWagAAQNQP/1SPAP8KapxL7G8hVL8K\nvLRMohoojrJp07RiTQkBzX3yxbSl24b1bnaNHJkzuwf2XzZkQoYoZjc2ci1j\nWv03qE5cTPLZgqBjH7TSEdi9+5FDgc3BXostJ9ltnIOZp7RI826ig32MMmil\nnlYdHpLdl21YyJrnxiSvrf6IkvbHZDi5SMfCrD+JJNDwqvmTGw2jkv11aSs0\nYrhil8AaLvBdtJ3YTqUcLc9lK+hjseXeUk33z5tHJk/yJ1gTbBglOtBxhaZ+\n/Y0weJCB7HcO84oWUdskLv6q2lWE40G4KQflf1NjhVA0bic0gwd6nRBSHvhT\ng+AGJ6L5JrNzLoqoP+Y072mFkotD3mn+IMcRpudTT50ridO6LWicGJFfBKrD\nC88p0vxrpcPHAiqj48oFB1teQQEzuvsPYQ2gnxW5LphVJV1EPM3nCgcurqGP\n86cC8byiDaVPabGXt33dONtAU3HA2ApudiRR4HEiWLTrBijBET6eUQJAdmw/\nmI+8S0YcuJU+G26cvy7ZD7xfD6J2GivUjzcMJcqTOO1SrYAb/awMdrgFjjjN\nYtLmrTV/2M61HGGN0JOsI1xMqa5Yr3q1LbVybUKzFwM41Q4gVLgs/BLDUGTo\nMjgkuyY+kSuZ60xNXGdR1b4mdKMvKZ9/n1YPV0bk7krfK3ftOdqKC9Telz/5\nQXzK\r\n=8vCd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"8a5f9a7718fe1713260f552075fc0e2730227eca","scripts":{"test":"cross-env TS_NODE_FILES=true nyc mocha --exit --require ts-node/register --colors test/**/*.ts","build":"tsc --outDir dist","clean":"rm -rf dist","start":"npm run build && node dist/index","prepare":"npm run build","coverage":"nyc report --reporter=text-lcov | coveralls","start:dev":"tsc -w index.ts"},"_npmUser":{"name":"ajimae","email":"meeky.ae@gmail.com"},"repository":{"url":"git+https://github.com/ajimae/ncrypt-js.git","type":"git"},"_npmVersion":"6.4.1","description":"a light weight javascript data encryption and decryption library","directories":{},"_nodeVersion":"8.12.0","_hasShrinkwrap":false,"devDependencies":{"nyc":"^14.1.1","chai":"^4.2.0","mocha":"^6.2.0","crypto":"^1.0.1","ts-node":"^8.3.0","coveralls":"^3.0.6","cross-env":"^5.2.0","typescript":"^3.5.3","@types/chai":"^4.2.0","@types/node":"^12.7.2","@types/mocha":"^5.2.7","mocha-istanbul":"^0.3.0","mocha-lcov-reporter":"^1.3.0"},"_npmOperationalInternal":{"tmp":"tmp/ncrypt-js_1.0.0_1566944405344_0.5340510637171134","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"ncrypt-js","version":"1.1.0","keywords":["ncrypt-js","crypto","cipher","decrypt","encrypt","typescript","ecmascript5","encryption","cryptojs","cryptography","decryption","javascript-library"],"author":{"name":"meeky"},"license":"MIT","_id":"ncrypt-js@1.1.0","maintainers":[{"name":"ajimae","email":"meeky.ae@gmail.com"}],"homepage":"https://github.com/ajimae/ncrypt-js#readme","bugs":{"url":"https://github.com/ajimae/ncrypt-js/issues"},"dist":{"shasum":"3972a3d84a961db137547eb4d580c8c46f88f95d","tarball":"https://registry.npmjs.org/ncrypt-js/-/ncrypt-js-1.1.0.tgz","fileCount":18,"integrity":"sha512-NWu3KK0b+p/pa5jTZ3H7dfDWWoJyyeIslNMmwnKwSbg6yrXA0ElyAxrTHTgmPat+MitZa7W7ox6VdSe/uj5GAg==","signatures":[{"sig":"MEUCIQCqyIlrMNMPXWQi00u00ldbmORpXVK754jxgO+M0tP0HAIgeesB8Rme50oedMtrTGGE7i8VBCicGYXudBSc5z2o4nw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33743,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeYU2uCRA9TVsSAnZWagAAaAUP/0ncQUXcW3NFRfotJoPw\nx9S+Rg+/7D5pPJ6pE9O5RB21x6Vj8NmnhfL1b79ovSqFcsxU7XY/x+Xt9U8Z\nhhzUc9wzlnn1/olgcucwkHUGQdH7DWvkE3j6yRRWpmYA+X99eSvcfvc33GlT\nfxZyyrOB/chF1pGkLyCKp+69jtSK9zFMsJEi/BrB1/7OqyQECIabMS0AjMuS\n7EFU6riPLZRCgKH9NfjV7xGLCg4yLzw3yq4fLAgEDq8ATyDwN642gHe1+s10\nXKvoiTpY6aBDXQ7aOC9hf30eWcVC7i+JDIzsVDxgVTEwGN6uzlssMUZSeJRR\nziYCN+wnXl364ca1FzLwY4NyWi32jT/6FhQyuUqU5FauNbG7y6kpcxb0iLn9\n3rcb6w/YGvfh/erKw+p2lflD3cQQgGP8hd0PgjQnh8DMwql+O+llp4xgUeC8\npnoLu3Nf1rWc8zY4jo71OA4c6WnE9G2tzgExgw9Ii5M56NvYyaB5QidaMGNt\nQtEkYV6pFa6oCCJpdpAKeOG3JGSuW6lk07tD9EXdP2TT4Dibb7/O3Xzz6o/o\n2KvFSRjjqvNc70rvEhErKEisVJEQ0UQye7ZnIDjN6xacTXAQJGKMbn9wBisN\nCMD+oFcV8okHs8I8TYpPfXk+Q3W3tMKoK5CR0G/Pn1EUfDfTV5GaLrL5boJR\n28f9\r\n=PTNP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"9b7ca8e6defc87c0f39b60a3b879e0aad122c49f","scripts":{"test":"cross-env TS_NODE_FILES=true nyc mocha --exit --require ts-node/register --colors test/**/*.ts","build":"tsc --outDir dist","clean":"rm -rf dist","start":"npm run build && node dist/index","prepare":"npm run build","coverage":"nyc report --reporter=text-lcov | coveralls","start:dev":"ts-node index.ts"},"_npmUser":{"name":"ajimae","email":"meeky.ae@gmail.com"},"repository":{"url":"git+https://github.com/ajimae/ncrypt-js.git","type":"git"},"_npmVersion":"6.11.3","description":"a light weight javascript data encryption and decryption library","directories":{},"_nodeVersion":"10.17.0","dependencies":{"crypto":"^1.0.1","dotenv":"^8.2.0","handlebars":"^4.7.3","simple-crypto-js":"^2.2.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^14.1.1","chai":"^4.2.0","mocha":"^6.2.2","ts-node":"^8.6.2","coveralls":"^3.0.9","cross-env":"^5.2.1","typescript":"^3.8.3","@types/chai":"^4.2.10","@types/node":"^12.12.29","@types/mocha":"^5.2.7","mocha-istanbul":"^0.3.0","mocha-lcov-reporter":"^1.3.0"},"_npmOperationalInternal":{"tmp":"tmp/ncrypt-js_1.1.0_1583435182283_0.5218163336023589","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"ncrypt-js","version":"2.0.0","keywords":["ncrypt-js","crypto","cipher","decrypt","encrypt","typescript","ecmascript5","encryption","cryptojs","cryptography","decryption","javascript-library"],"author":{"name":"meeky"},"license":"MIT","_id":"ncrypt-js@2.0.0","maintainers":[{"name":"ajimae","email":"meeky.ae@gmail.com"}],"homepage":"https://github.com/ajimae/ncrypt-js#readme","bugs":{"url":"https://github.com/ajimae/ncrypt-js/issues"},"dist":{"shasum":"f7f0e440ed13559b035a04f2439a0e70712ed5e0","tarball":"https://registry.npmjs.org/ncrypt-js/-/ncrypt-js-2.0.0.tgz","fileCount":17,"integrity":"sha512-zkgSpy1jgiRxjMuGKpD0QjjXqs+lCtt7XhgPKWlvwii3sIBpxOYQiGRv+fIZ6SBu63U4I9FY+0mYeqpbMVe08A==","signatures":[{"sig":"MEYCIQCABdJhZdzpJAtY0DGcgduXcmuthTTkxt72+JcSwM1BHQIhALqGQxLivYcPPdm0EkJpXvcXMdOAEFS8gm3a5+uYmr/N","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":30686,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeYVfSCRA9TVsSAnZWagAAmL8P/jsNaXmPobfTJjTldfQJ\n1eYXRrOog2XoJI1zUzGl8A83BL+ZTs5HQB1Q/esYn/Qz/TcgVLihomQZqJrb\noas/vpruRopw2nRWlTcbk39q78Jjhw9dHIuFtEAoh46PSQeTHUDtiukIuhsk\n440qKZ9ifl+Irc9e5eo96yVqGT8HLASLb5KIyu+PjPlP5MOfPbxii2WBn4bj\nF2ZeMdF6fGAmBWy8yyTZHR0DLuTnwNR+lwfGv04hfg6h657eOC9jPvF1K5Ff\n3klj2U6vYvfNYJyO0wGUmloQaiJrjbj4EFbG+CzQwsDEX6GU7dRmMEx/vDBG\nUIRSvx3zBvaO1UsazEZ5i5ur3wvfznO0y9bqFgDQEMw/VBLajQ7E7jMeHT0b\nNJRkeOXFvg78QmkipWy4/6YyQft70LDX7TDWz5MIfmo4SSoGU5kq4yXQm+el\n4kQ4hAy/C/wo9pDeIL3tD1m2bPLJ6sxyeTzdQ60NELUVFV+bntF2ZTKPDmET\n0rzNG6igNginNHsvIezaICsL6VOaQx09wn5gRk+c7Rl5cdx8g+dnRmwvc0Sj\n6qGKVRGd7QrSWKiyhlLPSHsw9shxCdwM6jY4aw4+It/D1Rctlhm+Zlb2MIvb\nZkiD9+0I/69pefj/Zd9kPFv7EhgQVntjijLKLmEhk00Tx338PXy66l//3vnJ\nGluF\r\n=3XFJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"8344f6954138e1ecb15dcd9c573c8b1e4faa63a1","scripts":{"test":"cross-env TS_NODE_FILES=true nyc mocha --exit --require ts-node/register --colors test/**/*.ts","build":"tsc --outDir dist","clean":"rm -rf dist","start":"npm run build && node dist/index","prepare":"npm run build","coverage":"nyc report --reporter=text-lcov | coveralls","start:dev":"ts-node index.ts"},"_npmUser":{"name":"ajimae","email":"meeky.ae@gmail.com"},"repository":{"url":"git+https://github.com/ajimae/ncrypt-js.git","type":"git"},"_npmVersion":"6.11.3","description":"a light weight javascript data encryption and decryption library","directories":{},"_nodeVersion":"10.17.0","dependencies":{"crypto":"^1.0.1","dotenv":"^8.2.0","handlebars":"^4.7.3","simple-crypto-js":"^2.2.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^14.1.1","chai":"^4.2.0","mocha":"^6.2.2","ts-node":"^8.6.2","coveralls":"^3.0.9","cross-env":"^5.2.1","typescript":"^3.8.3","@types/chai":"^4.2.10","@types/node":"^12.12.29","@types/mocha":"^5.2.7","mocha-istanbul":"^0.3.0","mocha-lcov-reporter":"^1.3.0"},"_npmOperationalInternal":{"tmp":"tmp/ncrypt-js_2.0.0_1583437778344_0.8661358839735336","host":"s3://npm-registry-packages"}},"2.0.1":{"name":"ncrypt-js","version":"2.0.1","keywords":["ncrypt-js","crypto","cipher","decrypt","encrypt","typescript","ecmascript5","encryption","cryptojs","cryptography","decryption","javascript-library"],"author":{"name":"meeky"},"license":"MIT","_id":"ncrypt-js@2.0.1","maintainers":[{"name":"ajimae","email":"meeky.ae@gmail.com"}],"homepage":"https://github.com/ajimae/ncrypt-js#readme","bugs":{"url":"https://github.com/ajimae/ncrypt-js/issues"},"dist":{"shasum":"9daebc9b46acdb170602309320fd22186929b60a","tarball":"https://registry.npmjs.org/ncrypt-js/-/ncrypt-js-2.0.1.tgz","fileCount":10,"integrity":"sha512-p6XXgJ+2ab699F4ZA/Tg5QsSj23dDReUzvSnv8vIBLPRRiD0+keDi9XkvbtEKje6N9wtSoNVzFfSK3zK4+SG4A==","signatures":[{"sig":"MEUCIQDuPe8T6qt5z1UfX5jNz5ALoBXtgh9lLsRoqYlPtVDZqwIgP80RRSjQl+uz5uu5m6hqjyHzICi7kmjuE1IoxztxVbQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":18481},"main":"dist/index.js","scripts":{"test":"cross-env TS_NODE_FILES=true nyc mocha --exit --require ts-node/register --colors test/**/*.ts","build":"yarn clean;tsc --outDir dist","clean":"rm -rf dist","prepare":"yarn build","coverage":"nyc report --reporter=text-lcov | coveralls"},"_npmUser":{"name":"ajimae","email":"meeky.ae@gmail.com"},"repository":{"url":"git+https://github.com/ajimae/ncrypt-js.git","type":"git"},"description":"a light weight javascript data encryption and decryption library","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2019 Ajima Chukwuemeka\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"crypto":"^1.0.1","dotenv":"^16.4.5"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^14.1.1","chai":"^4.2.0","mocha":"^6.2.2","ts-node":"^8.6.2","coveralls":"^3.0.9","cross-env":"^5.2.1","typescript":"^3.8.3","@types/chai":"^4.2.10","@types/node":"^12.12.29","@types/mocha":"^5.2.7","mocha-istanbul":"^0.3.0","mocha-lcov-reporter":"^1.3.0"},"_npmOperationalInternal":{"tmp":"tmp/ncrypt-js_2.0.1_1711020394154_0.21825162427623335","host":"s3://npm-registry-packages"}},"2.1.0":{"name":"ncrypt-js","version":"2.1.0","keywords":["ncrypt-js","crypto","cipher","decrypt","encrypt","typescript","ecmascript5","encryption","cryptojs","cryptography","decryption","javascript-library"],"author":{"name":"ajimae"},"license":"MIT","_id":"ncrypt-js@2.1.0","maintainers":[{"name":"ajimae","email":"meeky.ae@gmail.com"}],"homepage":"https://github.com/ajimae/ncrypt-js#readme","bugs":{"url":"https://github.com/ajimae/ncrypt-js/issues"},"dist":{"shasum":"6ed822390da127a16b153524d167ff4807c90468","tarball":"https://registry.npmjs.org/ncrypt-js/-/ncrypt-js-2.1.0.tgz","fileCount":11,"integrity":"sha512-/e72zeSZjCiNsj8vvSKptPGPG9jhftJrHBm7EnpBzHFRRMl7Jj0mO5DDq2EhgGdOwMuIkjrBpx6MIkVJoW1w4Q==","signatures":[{"sig":"MEUCIQClZrUflOSOKj2cf9zxFYd/S6kuf5ihDiYodwyPL1SqUQIgbaiOc398G8XnH0RAf8l9pbRWnv7GXikD8k3uAGi5fTc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22758},"main":"dist/index.js","scripts":{"test":"cross-env TS_NODE_FILES=true nyc mocha --exit --require ts-node/register --colors test/**/*.ts","build":"yarn clean;tsc --outDir dist","clean":"rm -rf dist","prepare":"yarn build","coverage":"nyc report --reporter=text-lcov | coveralls"},"_npmUser":{"name":"ajimae","email":"meeky.ae@gmail.com"},"repository":{"url":"git+https://github.com/ajimae/ncrypt-js.git","type":"git"},"description":"a light weight javascript data encryption and decryption library","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2019 Ajima Chukwuemeka\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{"crypto":"^1.0.1"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^14.1.1","chai":"^4.2.0","mocha":"^6.2.2","ts-node":"^8.6.2","coveralls":"^3.0.9","cross-env":"^5.2.1","typescript":"3.8.3","@types/chai":"^4.2.10","@types/node":"^12.12.29","@types/mocha":"^5.2.7","mocha-istanbul":"^0.3.0","mocha-lcov-reporter":"^1.3.0"},"_npmOperationalInternal":{"tmp":"tmp/ncrypt-js_2.1.0_1711320339133_0.011183351798000896","host":"s3://npm-registry-packages"}},"2.1.1":{"name":"ncrypt-js","version":"2.1.1","keywords":["ncrypt-js","crypto","cipher","decrypt","encrypt","typescript","ecmascript5","encryption","cryptojs","cryptography","decryption","javascript-library"],"author":{"name":"ajimae"},"license":"MIT","_id":"ncrypt-js@2.1.1","maintainers":[{"name":"ajimae","email":"meeky.ae@gmail.com"}],"homepage":"https://github.com/ajimae/ncrypt-js#readme","bugs":{"url":"https://github.com/ajimae/ncrypt-js/issues"},"dist":{"shasum":"7302e08bd395c7faea50cc6f94db03e01e7619b2","tarball":"https://registry.npmjs.org/ncrypt-js/-/ncrypt-js-2.1.1.tgz","fileCount":11,"integrity":"sha512-GGFrnBLKTx1uSLNNIN+zKvPrcAFKL7vo/ghrhg9Sc1cJSi6Xti2+SYZSkZetLt3EJRK5+k9cXB5Bjd8C5ZKEVA==","signatures":[{"sig":"MEUCIFKWbEgR5uaqM24Uc5bPTTDhjoajrLJJWgwkWANtX18XAiEAj6l3cDLP9OWNWwl6BK1SHM3xoujl1rg7CVXadx0KKp4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22878},"main":"dist/index.js","scripts":{"test":"cross-env TS_NODE_FILES=true nyc mocha --exit --require ts-node/register --colors test/**/*.ts","build":"yarn clean;tsc --outDir dist","clean":"rm -rf dist","prepare":"yarn build","coverage":"nyc report --reporter=text-lcov | coveralls"},"_npmUser":{"name":"ajimae","email":"meeky.ae@gmail.com"},"repository":{"url":"git+https://github.com/ajimae/ncrypt-js.git","type":"git"},"description":"a light weight javascript data encryption and decryption library","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2019 Ajima Chukwuemeka\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_hasShrinkwrap":false,"devDependencies":{"nyc":"^14.1.1","chai":"^4.2.0","mocha":"^6.2.2","ts-node":"^8.6.2","coveralls":"^3.0.9","cross-env":"^5.2.1","typescript":"3.8.3","@types/chai":"^4.2.10","@types/node":"^12.12.29","@types/mocha":"^5.2.7","mocha-istanbul":"^0.3.0","mocha-lcov-reporter":"^1.3.0"},"_npmOperationalInternal":{"tmp":"tmp/ncrypt-js_2.1.1_1711834352304_0.9814950806205067","host":"s3://npm-registry-packages"}},"2.1.2":{"name":"ncrypt-js","version":"2.1.2","keywords":["ncrypt-js","crypto","cipher","decrypt","encrypt","typescript","ecmascript5","encryption","cryptojs","cryptography","decryption","javascript-library"],"author":{"name":"ajimae"},"license":"MIT","_id":"ncrypt-js@2.1.2","maintainers":[{"name":"ajimae","email":"meeky.ae@gmail.com"}],"homepage":"https://github.com/ajimae/ncrypt-js#readme","bugs":{"url":"https://github.com/ajimae/ncrypt-js/issues"},"dist":{"shasum":"ed588322ae578f64314e3c0d7bcb87d28e4a285c","tarball":"https://registry.npmjs.org/ncrypt-js/-/ncrypt-js-2.1.2.tgz","fileCount":10,"integrity":"sha512-/rp7ybVMLA7Bjo+/aUN22m+JGNgW9AQcG9vQ/0rUIVUku1CojXRuSSRJG19oFDghSvqFMJtRQd09Oy4n4vYrLA==","signatures":[{"sig":"MEUCIQD5AZHzufnkfFHyJPnsOjao5edHLzucYDsL/RirqH7a4gIga2RkJyaozcN76P5j9D/l9J9/U46B9Es6PtsodqaBOoA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22600},"main":"dist/index.js","scripts":{"test":"cross-env TS_NODE_FILES=true nyc mocha --exit --require ts-node/register --colors test/**/*.ts","build":"yarn clean;tsc --outDir dist","clean":"rm -rf dist","prepare":"yarn build","coverage":"nyc report --reporter=text-lcov | coveralls"},"_npmUser":{"name":"ajimae","email":"meeky.ae@gmail.com"},"repository":{"url":"git+https://github.com/ajimae/ncrypt-js.git","type":"git"},"description":"a light weight javascript data encryption and decryption library","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2019 Ajima Chukwuemeka\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_hasShrinkwrap":false,"devDependencies":{"nyc":"^14.1.1","chai":"^4.2.0","mocha":"^6.2.2","ts-node":"^8.6.2","coveralls":"^3.0.9","cross-env":"^5.2.1","typescript":"3.8.3","@types/chai":"^4.2.10","@types/node":"^12.12.29","@types/mocha":"^5.2.7","mocha-istanbul":"^0.3.0","mocha-lcov-reporter":"^1.3.0"},"_npmOperationalInternal":{"tmp":"tmp/ncrypt-js_2.1.2_1729823914006_0.6788992480219922","host":"s3://npm-registry-packages"}},"2.2.0":{"name":"ncrypt-js","version":"2.2.0","keywords":["ncrypt-js","crypto","cipher","decrypt","encrypt","typescript","ecmascript5","encryption","cryptojs","cryptography","decryption","javascript-library"],"author":{"name":"ajimae"},"license":"MIT","_id":"ncrypt-js@2.2.0","maintainers":[{"name":"ajimae","email":"meeky.ae@gmail.com"}],"homepage":"https://github.com/ajimae/ncrypt-js#readme","bugs":{"url":"https://github.com/ajimae/ncrypt-js/issues"},"dist":{"shasum":"ffe78d2bd8fe4788b41b2479c118792296a21990","tarball":"https://registry.npmjs.org/ncrypt-js/-/ncrypt-js-2.2.0.tgz","fileCount":7,"integrity":"sha512-Eaa5FJilNdIaX4+U20rGyXiwjNFJKJWJNKzH6Ga9ZxqxQY4emw5GQJyFgfp6a1YWn8N+NIDB+gFBfKXi84q3bA==","signatures":[{"sig":"MEUCIGfuoT3PsjZEgeF6uoi5qNscySky55VWg63EvOeGz9yvAiEAszYO2mu09LSfmQiYPcx8RKTgEiwPbDi3xhKyUeBQiDM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/ncrypt-js@2.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":31706},"main":"dist/index.js","types":"./dist/index.d.ts","gitHead":"d93964cadfdbcff7092d1424f2b145f2baee469c","scripts":{"test":"cross-env TS_NODE_FILES=true nyc mocha --exit --require ts-node/register --colors test/**/*.ts","build":"yarn clean;tsc --outDir dist","clean":"rm -rf dist","prepare":"yarn build","coverage":"nyc report --reporter=text-lcov | coveralls"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:3c34f116-69fa-4289-8594-18a5660d6d65"}},"repository":{"url":"git+https://github.com/ajimae/ncrypt-js.git","type":"git"},"_npmVersion":"11.9.0","description":"a light weight javascript data encryption and decryption library","directories":{},"_nodeVersion":"24.13.0","_hasShrinkwrap":false,"devDependencies":{"nyc":"^14.1.1","chai":"^4.2.0","mocha":"^6.2.2","ts-node":"^8.6.2","coveralls":"^3.0.9","cross-env":"^5.2.1","typescript":"3.8.3","@types/chai":"^4.2.10","@types/node":"^12.12.29","@types/mocha":"^5.2.7","mocha-istanbul":"^0.3.0","mocha-lcov-reporter":"^1.3.0"},"_npmOperationalInternal":{"tmp":"tmp/ncrypt-js_2.2.0_1770360180034_0.8316718878368341","host":"s3://npm-registry-packages-npm-production"}},"2.3.0":{"name":"ncrypt-js","version":"2.3.0","description":"a light weight javascript data encryption and decryption library","main":"dist/ncrypt.cjs","module":"dist/ncrypt.mjs","types":"dist/ncrypt.d.ts","exports":{".":{"import":{"types":"./dist/ncrypt.d.ts","default":"./dist/ncrypt.mjs"},"require":{"types":"./dist/ncrypt.d.ts","default":"./dist/ncrypt.cjs"}}},"scripts":{"clean":"rm -rf dist dist-test","prepare":"yarn build","prebuild":"yarn clean","build:bundle":"node esbuild.cjs","build":"yarn build:bundle && tsc","test":"cross-env TS_NODE_FILES=true nyc mocha --exit --require ts-node/register --colors test/**/*.ts","coverage":"nyc report --reporter=text-lcov | coveralls"},"repository":{"type":"git","url":"git+https://github.com/ajimae/ncrypt-js.git"},"keywords":["ncrypt-js","crypto","cipher","decrypt","encrypt","typescript","ecmascript5","encryption","cryptojs","cryptography","decryption","javascript-library"],"author":{"name":"ajimae"},"license":"MIT","bugs":{"url":"https://github.com/ajimae/ncrypt-js/issues"},"homepage":"https://github.com/ajimae/ncrypt-js#readme","devDependencies":{"@types/chai":"^5.2.3","@types/mocha":"^10.0.10","@types/node":"^26.0.0","chai":"^6.2.2","coveralls":"^3.1.1","cross-env":"^10.1.0","esbuild":"^0.28.1","mocha":"^11.7.6","mocha-istanbul":"^0.3.0","mocha-lcov-reporter":"^1.3.0","nyc":"^18.0.0","ts-node":"^10.9.2","typescript":"^6.0.3"},"gitHead":"3ba5032654834c20cda1a8da396fe91e8267e178","_id":"ncrypt-js@2.3.0","_nodeVersion":"24.18.0","_npmVersion":"12.0.1","dist":{"integrity":"sha512-JErZVRTrSYpU1weHxn7RdCiG+XQtxFbPUOmRdroFxIXubQilUYHXgBZ/IITtWHzK+rA6p4xf+tQpzpzsmTssQw==","shasum":"baf18ef7231272323370125386f79b37a4928c03","tarball":"https://registry.npmjs.org/ncrypt-js/-/ncrypt-js-2.3.0.tgz","fileCount":6,"unpackedSize":37533,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/ncrypt-js@2.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDYeRBtY58Zovvw10XWEJDu0GyvwNGFD8sefL6eJTK9fgIhAMkefDG5NgZSz+n4EVobA33mhomYtomS6wmyoI2nVUNu"}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:3c34f116-69fa-4289-8594-18a5660d6d65"}},"directories":{},"maintainers":[{"name":"ajimae","email":"meeky.ae@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ncrypt-js_2.3.0_1785008158431_0.518309788695207"},"_hasShrinkwrap":false}},"time":{"created":"2019-08-27T22:20:05.344Z","modified":"2026-07-25T19:35:58.955Z","1.0.0":"2019-08-27T22:20:05.478Z","1.1.0":"2020-03-05T19:06:22.451Z","2.0.0":"2020-03-05T19:49:38.467Z","2.0.1":"2024-03-21T11:26:34.334Z","2.1.0":"2024-03-24T22:45:39.282Z","2.1.1":"2024-03-30T21:32:32.463Z","2.1.2":"2024-10-25T02:38:34.185Z","2.2.0":"2026-02-06T06:43:00.185Z","2.3.0":"2026-07-25T19:35:58.566Z"},"bugs":{"url":"https://github.com/ajimae/ncrypt-js/issues"},"author":{"name":"ajimae"},"license":"MIT","homepage":"https://github.com/ajimae/ncrypt-js#readme","keywords":["ncrypt-js","crypto","cipher","decrypt","encrypt","typescript","ecmascript5","encryption","cryptojs","cryptography","decryption","javascript-library"],"repository":{"type":"git","url":"git+https://github.com/ajimae/ncrypt-js.git"},"description":"a light weight javascript data encryption and decryption library","maintainers":[{"name":"ajimae","email":"meeky.ae@gmail.com"}],"readme":"# NcryptJs\n\n![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/ajimae/ncrypt-js/.github%2Fworkflows%2Fci.yml)\n [![Coverage Status](https://coveralls.io/repos/github/ajimae/ncrypt-js/badge.svg)](https://coveralls.io/github/ajimae/ncrypt-js) ![NPM Downloads](https://img.shields.io/npm/dw/ncrypt-js)\n\n[![GitHub release (latest by date)](https://img.shields.io/github/v/release/ajimae/ncrypt-js)](https://github.com/ajimae/ncrypt-js/releases) [![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/ajimae/ncrypt-js)](https://github/languages/code-size/ajimae/ncrypt-js) [![GitHub issues](https://img.shields.io/github/issues/ajimae/ncrypt-js)](https://github.com/ajimae/ncrypt-js/issues) [![NPM](https://img.shields.io/npm/l/ncrypt-js)](https://www.npmjs.com/package/ncrypt-js/v/2.0.0#license)\n\n**_NcryptJs_** is a light weight javascript data encryption and decryption library. This library implements the nodejs default crypto functionality as a mid-channel cipher in addition to a simple and elegant custom data encoding and encryption algorithm.\n\n## Contents\n\n* [NcryptJs](#NcryptJs)\n  * [Contents](#contents)\n  * [Getting Started](#getting-started)\n    * [Installation](#installation)\n  * [Documentation](#documentation)\n    * [NcryptJs Methods](#ncryptjs-methods)\n    * [Using the `randomString()` methods](#using-randomstring-method)\n    * [Using `encrypt()` and `decrypt()` methods](#using-encrypt-and-decrypt-methods)\n    * [String Encryption](#string-encryption)\n    * [Object Encryption](#object-encryption)\n    * [Using password hashing methods](#using-password-hashing-methods)\n  * [Built With](#built-with)\n  * [Contribution](#contribution)\n  * [Version Management](#version-management)\n  * [Authors](#authors)\n  * [License](#license)\n  * [Acknowledgments](#acknowledgments)\n\n<!-- ## Changes Log (What's New)\n\n**What's New in 2.2.0**\n\n* Fix CDN release, setting webpack output as UMD with default library name of SimpleCrypto.\n* CDN now have two file you may use, the distribution file and minified distribution one.\n\nFor full changelog, please refers to [CHANGELOG](CHANGELOG.md) file. -->\n\n## Getting Started\n\nThis library is available through these javascript node package manager [npm](https://www.npmjs.org/) and [yarn](https://www.yarnpkg.com/).\n\n## Installation\n\nTo use this library, first ensure you have a package manager initialized either with [npm](https://www.npmjs.org/) or [yarn](https://www.yarnpkg.com/)\n\n```bash\n# for npm use:\nnpm install --save ncrypt-js\n\n# for yarn use:\nyarn add ncrypt-js\n```\n\nTo include **_ncrypt-js_** in your project. use one of these:\n\n```js\n// ES6 and later (typescript)\nimport ncrypt from \"ncrypt-js\";\n// or import { ncrypt } from \"ncrypt-js\"\n```\n\nHowever, if you are using ECMAScript 5 and older, use the require statement:\n\n```js\n// ES5 and older (commonjs)\nvar { ncrypt } = require(\"ncrypt-js\");\n// or var ncrypt = require(\"ncrypt-js\").default\n```\n\n## Documentation\n\n**_NcryptJs_** is a simple library with only two two exposed functions. This is all intentional mainly to keep everything simple. This is a complete documentation of the library and how to use it in your project. All examples work on both ECMAScript 6 (and later) and ECMAScript 5 (and older).\n\n### NcryptJs Methods\n\n\n### List of **_NcryptJs_** Methods.\n\n\n\n| Methods                                                                                              | Description                                                                                            | Parameters                                                                                             | Return                                                                                                 |\n| -------------------------------------------------------------                                          | --------------------------------------------------------------------------------------                 | -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------                                                                             | ----------------------------------------------------------------------------------------------------------------                                                                                                |\n| [_static_] **randomString()**                                                                                          | Random String.                                                                                     |**size**: _number_ - An optional size of the generated `randomBytes`. <br/>**enc:** _base64/hex_ - Encoding used for encoding the `randomBytes` defaults to _`base64`_ |**encoded**: _string_ - encoded string.                                                                    |\n| [_static_] **generate()**                                                                                          | Generates a hashed password.                                                                                     |**password**: _string_ - The password to hash. <br/>**options**: _object_ - Optional configuration object (see below). |**hashedPassword**: _string_ - The hashed password string.                                                                    |\n| [_static_] **verify()**                                                                                          | Verifies a password against a hashed password.                                                                 | **password**: _string_ - The password to verify. <br/>**hashedPassword**: _string_ - The hashed password to verify against. <br/>**options**: _object_ - Optional configuration object (see below).                        | **boolean** - Returns `true` if the password matches the hash, `false` otherwise.\n| [_static_] **isHashed()**                                                                                          | Checks if a string is a hashed password.                                                                 | **password**: _string_ - The string to check. <br/>**options**: _object_ - Optional configuration object (see below).                        | **boolean** - Returns `true` if the string appears to be a hashed password, `false` otherwise.\n| [_static_] **encode()**                                                                                          | Encodes payload into a JOSE-like token.                                                                 |**payload**: _Payload_ - Data to encode. <br/>**keyset**: _Keyset_ - Keyset with id, signing key, and encryption key. |**token**: _string_ - Dot-separated token (header.ciphertext.iv.signature).                                                                    |\n| [_static_] **decode()**                                                                                          | Decodes and verifies a JOSE-like token.                                                                 | **payload**: _string_ - The token string. <br/>**keysets**: _Keysets_ - Object mapping key IDs to Keysets.                        | **DecodedResult** - `{ id, payload }` with the key ID and decrypted payload.                                                                                                |\n| **encrypt()**                                                                                          | Encrypts data.                                                                                     |**data**: _object/string/number/boolean_ - The data to be encrypted. <br/>|**ciphered**: _string_ - encrypted data.                                                                    |\n| **decrypt()**                                                                                          | Decrypts the encrypted or ciphered data                                                                 | **encodedData**: string - The encrypted data: _string_ to be decrypted.                        | **data**: _string/object/number/boolean_ - The decrypted or original data (it might be string or object, depends on the initial input data type).                                                                    |\n| **compare()**                                                                                          | Compares two encrypted strings to check if they decrypt to the same value.                                                                 | **text1**: _string_ - First encrypted string. <br/>**text2**: _string_ - Second encrypted string.                        | **boolean** - Returns `true` if both decrypt to the same value, `false` otherwise.\n\n\n### Using randomString method\n\nThe `randomString()` static method can generate [random bytes](https://nodejs.org/api/crypto.html#cryptorandombytessize-callback) encoded into a `hexadecimal` or `base64` strings. This string can be useful in a variety of use cases e.g to generate database ids, to generate a unique string for a list, a unique serial strings, api keys etc.\n\n```ts\nvar { ncrypt } = require('ncrypt-js'); // or import ncrypt from 'ncrypt-js'\n\nvar randomStr = ncrypt.randomString(8, 'base64');\nconsole.log(randomStr) // t78WcmYAFOY=\n\n// signature\nncrypt.randomString(size?: number, enc?: 'base64' | 'hex');\n```\n\n### Using encrypt() and decrypt() methods\nThe `encrypt()` and `decrypt()` methods as of version 2.0.0 directly importing or invoking these methods is `deprecated`, an object must first be created with a secret, before the methods can then be invoked on the created object.\n\nTo `encrypt` and `decrypt` data, simply use `encrypt()` and `decrypt()` methods respectively. This will use `AES-256-CBC` encryption algorithm as the mid-channel cipher.\n\n```diff\n- var { encrypt, decrypt } = require(\"ncrypt-js\");\n+ var { ncrypt } = require(\"ncrypt-js\");\n\n\nvar data = \"Hello World!\";\nvar _secretKey = \"some-super-secret-key\";\n\n+ var { encrypt, decrypt } = new ncrypt(_secretKey);\n\n// encrypting super sensitive data here\n- var encryptedData = encrypt(data, _secretKey);\n+ var encryptedData = encrypt(data);\n\nconsole.log(\"Encryption process...\");\nconsole.log(\"Plain Text    : \" + data);\nconsole.log(\"Cipher Text   : \" + encryptedData);\n\n// decrypting the encrypted super sensitive data here\nvar decryptedData = decrypt(encryptedData);\nconsole.log(\"... and then decryption...\");\nconsole.log(\"Decipher Text : \" + decryptedData);\nconsole.log(\"...done.\");\n```\n\n### String Encryption\n\n```javascript\nvar { ncrypt } = require(\"ncrypt-js\");\n\nvar data = \"Hello World!\";\nvar _secretKey = \"some-super-secret-key\";\n\nvar ncryptObject = new ncrypt(_secretKey);\n\n// encrypting super sensitive data here\nvar encryptedData = ncryptObject.encrypt(data);\nconsole.log(\"Encryption process...\");\nconsole.log(\"Plain Text    : \" + data);\nconsole.log(\"Cipher Text   : \" + encryptedData);\n\n// decrypted super encrypted data here\nvar decryptedData = ncryptObject.decrypt(encryptedData);\nconsole.log(\"... and then decryption...\");\nconsole.log(\"Decipher Text : \" + decryptedData);\nconsole.log(\"...done.\");\n```\n\n### Object Encryption\n\nEncryption and decryption of JavaScript object literal has never been simpler than this. \n\nTo encrypt and decrypt JavaScript object literal, simply use `encrypt()` and `decrypt()` function from an instance. This will use AES-CBC encryption algorithm.\n\n\n```javascript\nvar { ncrypt } = require(\"ncrypt-js\");\n\nvar _secretKey = \"some-super-secret-key\";\nvar object = {\n  NycryptJs: \"is cool and fun.\",\n  You: \"should try it!\"\n}\n\nvar ncryptObject = new ncrypt('ncrypt-js');\n\n// encrypting super sensitive data here\nvar encryptedObject = ncryptObject.encrypt(object);\nconsole.log(\"Encryption process...\");\nconsole.log(\"Plain Object     : \", object);\nconsole.log(\"Encrypted Object : \" + encryptedObject);\n\n// decrypted super sensitive data here\nvar decryptedObject = ncryptObject.decrypt(encryptedObject);\nconsole.log(\"... and then decryption...\");\nconsole.log(\"Decipher Text : \", decryptedObject);\nconsole.log(\"...done.\");\n````\nIf you are using any sort of environmental key-value store, e.g `.env` and for additional security, you can add the following to your environment.\n\n```bash\n# .env\n\n# used internally to set the `key`\nKEY='sshhhh this is a super secret key'\n\n# used internally to set the `encoding` - ['base64' | 'binary' | 'hex' | 'ucs-2' | 'ucs2' | 'utf16le']\nNCRYPT_ENC='hex'\n\nSECRET='this is our hashing secret'\n```\nWhen creating your object, you can use the `SECRET` from your environment e.g:\n\n```js\nvar { ncrypt } = require('ncrypt-js');\nvar { encrypt, decrypt } = new ncrypt(process.env.SECRET);\n...\n```\n_**NOTE:** The secret is required to decrypt the encrypted data, if the secret used to encrypt a specific data is lost, then that data cannot be decrypted._\n\n_Same goes for encoding, if data was encrypted using `hex` encoding format, decrypting with a `base64` encoding or other encoding format and vise versa will not work_\n\n### Using password hashing methods\n\nThe `generate()`, `verify()`, and `isHashed()` static methods provide secure password hashing and verification functionality. These methods use HMAC (Hash-based Message Authentication Code) for password hashing.\n\n#### Generating a hashed password\n\nThe `generate()` method creates a secure hash of a password with a randomly generated salt.\n\n```ts\nvar { ncrypt } = require('ncrypt-js'); // or import ncrypt from 'ncrypt-js'\n\nvar password = \"mySecurePassword123\";\nvar hashedPassword = ncrypt.generate(password);\nconsole.log(hashedPassword); // sha1$abc12345$1$hashedvalue...\n\n// signature\nncrypt.generate(password: string, options?: {\n  algorithm?: string;          // Hash algorithm (default: 'sha1')\n  saltLength?: number;         // Salt length in characters (default: 8)\n  iterations?: number;         // Number of hash iterations (default: 1)\n  encoding?: 'hex' | 'base64'; // Encoding format (default: 'hex')\n  separator?: string;          // Separator character (default: '$')\n});\n```\n\n#### Verifying a password\n\nThe `verify()` method checks if a plain text password matches a previously hashed password.\n\n```ts\nvar { ncrypt } = require('ncrypt-js');\n\nvar password = \"mySecurePassword123\";\nvar hashedPassword = ncrypt.generate(password);\n\n// Later, verify the password\nvar isValid = ncrypt.verify(password, hashedPassword);\nconsole.log(isValid);           // true\n\n// signature\nncrypt.verify(password: string, hashedPassword: string, options?: {\n  encoding?: 'hex' | 'base64';  // Encoding format (default: 'hex')\n  separator?: string;           // Separator character (default: '$')\n});\n```\n\n#### Checking if a string is hashed\n\nThe `isHashed()` method checks if a string appears to be a hashed password by verifying its format.\n\n```ts\nvar { ncrypt } = require('ncrypt-js');\n\nvar hashedPassword = ncrypt.generate(\"password123\");\nvar isHashed = ncrypt.isHashed(hashedPassword);\nconsole.log(isHashed); // true\n\nvar plainPassword = \"password123\";\nvar isHashed = ncrypt.isHashed(plainPassword);\nconsole.log(isHashed); // false\n\n// signature\nncrypt.isHashed(password: string, options?: {\n  separator?: string; // Separator character (default: '$')\n});\n```\n\n#### Advanced usage with custom options\n\nYou can customize the hashing algorithm, salt length, iterations, encoding, and separator:\n\n```ts\nvar { ncrypt } = require('ncrypt-js');\n\n// Generate with custom options\nvar hashedPassword = ncrypt.generate(\"password123\", {\n  algorithm: \"sha256\",   // Use SHA-256 instead of SHA-1\n  saltLength: 16,        // Use 16 character salt\n  iterations: 1000,      // Apply hashing 1000 times\n  encoding: \"base64\",    // Use base64 encoding\n  separator: \".\"         // Use '.' as separator instead of '$'\n});\n\n// Verify with matching options\nvar isValid = ncrypt.verify(\"password123\", hashedPassword, {\n  encoding: \"base64\",\n  separator: \".\"\n});\nconsole.log(isValid); // true\n```\n\n**Available hash algorithms:** Any algorithm supported by Node.js `crypto.createHmac()`, such as `'sha1'`, `'sha256'`, `'sha512'`, `'md5'`, etc.\n\n**Note:** The `encoding` and `separator` options must match between `generate()` and `verify()` calls for verification to succeed. To be safe, ensure you create a single options object and use the same object everywhere.\n\n```ts\nconst same_options_obj = {\n  ...\n}\n\nncrypt.generate(\"pass\", same_options_obj)\nncrypt.verify(\"pass\", hasedPass, same_options_obj)\n```\n\n### Using compare() method\n\nThe `compare()` instance method checks whether two encrypted strings decrypt to the same original value without exposing the plaintext.\n\n```js\nvar { ncrypt } = require('ncrypt-js');\n\nvar _secretKey = \"some-super-secret-key\";\nvar ncryptObject = new ncrypt(_secretKey);\n\nvar encrypted1 = ncryptObject.encrypt(\"Hello World!\");\nvar encrypted2 = ncryptObject.encrypt(\"Hello World!\");\nvar encrypted3 = ncryptObject.encrypt(\"Different value\");\n\nconsole.log(ncryptObject.compare(encrypted1, encrypted2)); // true\nconsole.log(ncryptObject.compare(encrypted1, encrypted3)); // false\n```\n\n### Using encode() and decode() static methods\n\nThe `encode()` and `decode()` static methods provide a JOSE-like token format for secure data exchange. They use a keyset containing a key ID (`id`), a signing key (`skey`), and an encryption key (`ekey`). The token is a dot-separated string consisting of a base64url-encoded header, ciphertext, IV, and HMAC signature.\n\n```js\nvar { ncrypt } = require('ncrypt-js');\n\n// Create a keyset\nvar keyset = {\n  id: \"key1\",\n  skey: Buffer.from(\"my-signing-key-which-must-be-32-chars-long!\", \"utf-8\"),\n  ekey: Buffer.from(\"my-encryption-key-which-must-be-32-chars-long\", \"utf-8\"),\n};\n\n// Encode a payload\nvar token = ncrypt.encode({ user: \"alice\", role: \"admin\" }, keyset);\nconsole.log(token); // eyJraWQiOiJrZXkxIn0.0lW6zg... (dot-separated token)\n\n// Decode and verify the token\nvar keysets = { key1: keyset };\nvar result = ncrypt.decode(token, keysets);\nconsole.log(result.id);      // \"key1\"\nconsole.log(result.payload); // { user: \"alice\", role: \"admin\" }\n```\n\nYou can manage multiple keysets and rotate keys by adding new entries to the keysets object:\n\n```js\nvar keysets = {\n  key1: { id: \"key1\", skey: Buffer.from(\"...\"), ekey: Buffer.from(\"...\") },\n  key2: { id: \"key2\", skey: Buffer.from(\"...\"), ekey: Buffer.from(\"...\") },\n};\n\n// Token created with key1 can still be decoded as long as key1 is in keysets\nvar result = ncrypt.decode(token, keysets);\nconsole.log(result.id); // \"key1\"\n```\n\n**Note:** The `decode()` method validates the HMAC signature using `crypto.timingSafeEqual()` to prevent timing attacks. If the signature doesn't match, it throws `\"Signatures do not match.\"`.\n\n## Built With \n\nWritten in [TypeScript](https://typscriptlang.org/), built into ECMAScript 5 using the TypeScript compiler.\n\n## Contribution\n\nTo contribute, simply fork this project, and issue a pull request.\n\n## Versioning\n\nWe use [SemVer](http://semver.org/) for version management. For the versions available, see the [tags on this repository](https://github.com/ajimae/ncrypt-js/tags).\n\n## Authors\n\n* **Chukwuemeka Ajima** - _Initial work_ - [ajimae](https://github.com/ajimae)\n\n<!-- Feel free to include a CONTRIBUTORS.md file and modify this contributors secion -->\n<!-- See also the list of [contributors](CONTRIBUTORS) who participated in this project. -->\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details\n\n## Acknowledgments\n\n* This library was developed to simplify how data is encrypted and decrypted in javascript.\n* Made available by open source and special thanks to [Shahid](https://twitter.com/codeforgeek) for his super simple [article](https://codeforgeek.com/encrypt-and-decrypt-data-in-node-js/) on node core encryption (crypto) library.\n* Thanks to [danang-id](https://github.com/danang-id) whose [README](https://github.com/danang-id/simple-crypto-js/blob/master/README.md) was very insightful and [Jorgeblom](https://stackoverflow.com/users/2861702/jorgeblom) for his custom cipher algorithm on this stackoverflow [answer](https://stackoverflow.com/a/54026460/4907157)\n","readmeFilename":"README.md"}