{"_id":"@abdelilahakebli/vault","_rev":"8-e0bbb387283fd5d3263dfecde197d15e","name":"@abdelilahakebli/vault","dist-tags":{"latest":"1.0.8"},"versions":{"1.0.0":{"name":"@abdelilahakebli/vault","version":"1.0.0","description":"In memory key value pair database with encryption.","main":"src/index.js","type":"module","scripts":{"build":"tsc","watch":"tsc -w","test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/abdelilahakebli/vault.git"},"keywords":["memory","database","security"],"author":{"name":"https://github.com/abdelilahakebli/"},"license":"ISC","bugs":{"url":"https://github.com/abdelilahakebli/vault/issues"},"homepage":"https://github.com/abdelilahakebli/vault#readme","devDependencies":{"@types/node":"^20.9.2","typescript":"^5.2.2"},"dependencies":{"crypto":"^1.0.1"},"_id":"@abdelilahakebli/vault@1.0.0","gitHead":"2c2b7cf0e6870854aa44b2075838920ea1f9b359","_nodeVersion":"20.8.1","_npmVersion":"10.1.0","dist":{"integrity":"sha512-xUb+//oAdqwmYiUSz6f1BeZZ1Vb7xGF/4ORyW6TwBSMpq4w/uy20VC+fiq8IYDuJD9nPV8Iz96xzAQjYzCYFDA==","shasum":"1cff385954f3fda3e05b56ad494debc37f791872","tarball":"https://registry.npmjs.org/@abdelilahakebli/vault/-/vault-1.0.0.tgz","fileCount":5,"unpackedSize":7485,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCJOKxWHT/ULYSq1oxV4j6aDirtBf0CE3qiPMCJ6OOzcgIgWqngqtWfNj6u3gTidclndlI760vHMDZtp17k+cbjoSE="}]},"_npmUser":{"name":"abdelilahakebli","email":"abdelilahworkset@gmail.com"},"directories":{},"maintainers":[{"name":"abdelilahakebli","email":"abdelilahworkset@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vault_1.0.0_1700399927533_0.3702386204550714"},"_hasShrinkwrap":false},"1.0.1":{"name":"@abdelilahakebli/vault","version":"1.0.1","description":"In memory key value pair database with encryption.","main":"src/index.js","type":"module","scripts":{"build":"tsc","watch":"tsc -w","test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/abdelilahakebli/vault.git"},"keywords":["memory","database","security"],"author":{"name":"https://github.com/abdelilahakebli/"},"license":"ISC","bugs":{"url":"https://github.com/abdelilahakebli/vault/issues"},"homepage":"https://github.com/abdelilahakebli/vault#readme","devDependencies":{"@types/node":"^20.9.2","typescript":"^5.2.2"},"dependencies":{"crypto":"^1.0.1"},"_id":"@abdelilahakebli/vault@1.0.1","gitHead":"b870161661ea9657e591a71a8fbd1f670180e3b3","_nodeVersion":"20.8.1","_npmVersion":"10.1.0","dist":{"integrity":"sha512-mBvx/iIH57Y+kHUHr+EmNLJUxQxGgaglwkLEVQmShpqx7D4OHls3iC6QMapG9Ir+l849hbMRJIA6dUuDlYE5Jw==","shasum":"894cd9cc974c99e78de63864da867b83cc7a19fe","tarball":"https://registry.npmjs.org/@abdelilahakebli/vault/-/vault-1.0.1.tgz","fileCount":5,"unpackedSize":8571,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH4dD0Lvk4Pvs+3850+4vDl71oHRDf+n2rrYeJNd5YoAAiEAqm5LLNFE+hq0/jgc2BJJjgJkxkaFaNyZ6dO/ac5Pbqg="}]},"_npmUser":{"name":"abdelilahakebli","email":"abdelilahworkset@gmail.com"},"directories":{},"maintainers":[{"name":"abdelilahakebli","email":"abdelilahworkset@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vault_1.0.1_1700400820950_0.7514979200850154"},"_hasShrinkwrap":false},"1.0.2":{"name":"@abdelilahakebli/vault","version":"1.0.2","description":"In memory key value pair database with encryption.","main":"src/index.js","type":"commonjs","scripts":{"build":"tsc","watch":"tsc -w","test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/abdelilahakebli/vault.git"},"keywords":["memory","database","security"],"author":{"name":"https://github.com/abdelilahakebli/"},"license":"ISC","bugs":{"url":"https://github.com/abdelilahakebli/vault/issues"},"homepage":"https://github.com/abdelilahakebli/vault#readme","devDependencies":{"@types/node":"^20.9.2","typescript":"^5.2.2"},"dependencies":{"crypto":"^1.0.1"},"_id":"@abdelilahakebli/vault@1.0.2","gitHead":"3926187a15657446f80e100a5f6c032686dff841","_nodeVersion":"20.8.1","_npmVersion":"10.1.0","dist":{"integrity":"sha512-Nj0ahh6ux7APSxOEKlZgiI6GLazdu+O/tw/LtOjg1AQPrxY1ioCju7e73s/ko5q7hspgZCRZWoZjpQH06y2jLw==","shasum":"a58c149bd2bb18eb80df01530fbc59da9f773b61","tarball":"https://registry.npmjs.org/@abdelilahakebli/vault/-/vault-1.0.2.tgz","fileCount":5,"unpackedSize":8573,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC0stNVoDcvsf0AAqzFfEVO4lLAN5WFPkBOxE56A4jcKAIhAKu4oSXz5pX1Cg0/KmX4ep5hBvzwlOxGrMn4ns3CDMmg"}]},"_npmUser":{"name":"abdelilahakebli","email":"abdelilahworkset@gmail.com"},"directories":{},"maintainers":[{"name":"abdelilahakebli","email":"abdelilahworkset@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vault_1.0.2_1700401057532_0.633680100372245"},"_hasShrinkwrap":false},"1.0.3":{"name":"@abdelilahakebli/vault","version":"1.0.3","description":"In memory key value pair database with encryption.","main":"cjs/index.js","type":"module","scripts":{"build":"tsc","watch":"tsc -w","test":"echo \"Error: no test specified\" && exit 1"},"exports":{"require":"./cjs/index.js","import":"./esm/index.js"},"repository":{"type":"git","url":"git+https://github.com/abdelilahakebli/vault.git"},"keywords":["memory","database","security"],"author":{"name":"https://github.com/abdelilahakebli/"},"license":"ISC","bugs":{"url":"https://github.com/abdelilahakebli/vault/issues"},"homepage":"https://github.com/abdelilahakebli/vault#readme","devDependencies":{"@types/node":"^20.9.2","typescript":"^5.2.2"},"dependencies":{"crypto":"^1.0.1"},"_id":"@abdelilahakebli/vault@1.0.3","gitHead":"7c171862e29f55ce7f38a2f6fcec0fb4a83da6bd","_nodeVersion":"20.8.1","_npmVersion":"10.1.0","dist":{"integrity":"sha512-EOFd6+KBSiE11zsWw/ewJtPX4W3SRqh1Xd7R3M3/AqA8MjqK2QYMIU6OI8YTV1o0keu66/r6BKsdRx0OuxhMNA==","shasum":"071f8dd4f0de1ea4bd0028d9c9cd92155a847e6a","tarball":"https://registry.npmjs.org/@abdelilahakebli/vault/-/vault-1.0.3.tgz","fileCount":5,"unpackedSize":8341,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBJHLFo8gd6dAFM1C0jBou6i8zJAKiR8SWeuGTPWJvOVAiAgeH2zadDkyHdKWYW1ikO3i9zTkE32j7A0gpf7EHjWiA=="}]},"_npmUser":{"name":"abdelilahakebli","email":"abdelilahworkset@gmail.com"},"directories":{},"maintainers":[{"name":"abdelilahakebli","email":"abdelilahworkset@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vault_1.0.3_1700401891413_0.9202216533099474"},"_hasShrinkwrap":false},"1.0.4":{"name":"@abdelilahakebli/vault","version":"1.0.4","description":"In memory key value pair database with encryption.","main":"cjs/index.js","type":"module","scripts":{"build":"tsc","watch":"tsc -w","test":"echo \"Error: no test specified\" && exit 1"},"exports":{"require":"./cjs/index.js","import":"./esm/index.js"},"repository":{"type":"git","url":"git+https://github.com/abdelilahakebli/vault.git"},"keywords":["memory","database","security"],"author":{"name":"https://github.com/abdelilahakebli/"},"license":"ISC","bugs":{"url":"https://github.com/abdelilahakebli/vault/issues"},"homepage":"https://github.com/abdelilahakebli/vault#readme","devDependencies":{"@types/node":"^20.9.2","typescript":"^5.2.2"},"dependencies":{"crypto":"^1.0.1"},"_id":"@abdelilahakebli/vault@1.0.4","gitHead":"59e473a2c808913c6c9a76c2e7e0b268a27cdc55","_nodeVersion":"20.8.1","_npmVersion":"10.1.0","dist":{"integrity":"sha512-WlmTq1++M1b5HoVctUigNtBkXlDjD8IWUfYuWHl9xSBdBhDfYK9DSrdSfqYKRyE3G0PDe8Wad81Qdie+fve4Ig==","shasum":"effb87e5990857bc1af70cef8dd881dd9821c248","tarball":"https://registry.npmjs.org/@abdelilahakebli/vault/-/vault-1.0.4.tgz","fileCount":5,"unpackedSize":8341,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBeLMN0Xi3oj2rTi0u0XfTfYE2vOMT9ck7awLmqtJjpYAiAp8Z93lV1M8EKv45D13Ig3bhtnHvGjdP22GJgAgBS7Sg=="}]},"_npmUser":{"name":"abdelilahakebli","email":"abdelilahworkset@gmail.com"},"directories":{},"maintainers":[{"name":"abdelilahakebli","email":"abdelilahworkset@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vault_1.0.4_1700402123272_0.268023090709399"},"_hasShrinkwrap":false},"1.0.5":{"name":"@abdelilahakebli/vault","version":"1.0.5","description":"In memory key value pair database with encryption.","main":"cjs/index.js","type":"commonjs","scripts":{"build":"tsc","watch":"tsc -w","test":"echo \"Error: no test specified\" && exit 1"},"exports":{"require":"./cjs/index.js","import":"./esm/index.js"},"repository":{"type":"git","url":"git+https://github.com/abdelilahakebli/vault.git"},"keywords":["memory","database","security"],"author":{"name":"https://github.com/abdelilahakebli/"},"license":"ISC","bugs":{"url":"https://github.com/abdelilahakebli/vault/issues"},"homepage":"https://github.com/abdelilahakebli/vault#readme","devDependencies":{"@types/node":"^20.9.2","typescript":"^5.2.2"},"dependencies":{"crypto":"^1.0.1"},"_id":"@abdelilahakebli/vault@1.0.5","gitHead":"ad5f30613a9426104264d533584873fd2312d4f5","_nodeVersion":"20.8.1","_npmVersion":"10.1.0","dist":{"integrity":"sha512-UPkViQcwm6L+Lev2i2w26rfc9z4PGOI6MLzOo0UvtI7wjDq9RYbOpJd/qOHg6eTK3XKSG4gTPFQ6t4qleDmiAA==","shasum":"fd9e776386d75ddc6aa3223e90dc62ea0a735718","tarball":"https://registry.npmjs.org/@abdelilahakebli/vault/-/vault-1.0.5.tgz","fileCount":5,"unpackedSize":8343,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEihPiOStQ4UbkV8djRO5FRTbm0LcVWoe3fHdwu4/fFOAiEAmKsHQRmlF6ov5FwAhGK0am+goLZB3/DxOFj0CmuW+q4="}]},"_npmUser":{"name":"abdelilahakebli","email":"abdelilahworkset@gmail.com"},"directories":{},"maintainers":[{"name":"abdelilahakebli","email":"abdelilahworkset@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vault_1.0.5_1700402234407_0.5732536402663975"},"_hasShrinkwrap":false},"1.0.6":{"name":"@abdelilahakebli/vault","version":"1.0.6","description":"In memory key value pair database with encryption.","main":"src/index.js","type":"commonjs","scripts":{"build":"tsc","watch":"tsc -w","test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/abdelilahakebli/vault.git"},"keywords":["memory","database","security"],"author":{"name":"https://github.com/abdelilahakebli/"},"license":"ISC","bugs":{"url":"https://github.com/abdelilahakebli/vault/issues"},"homepage":"https://github.com/abdelilahakebli/vault#readme","devDependencies":{"@types/node":"^20.9.2","typescript":"^5.2.2"},"dependencies":{"crypto":"^1.0.1"},"_id":"@abdelilahakebli/vault@1.0.6","gitHead":"f3ad9cdca1a9c230f95ad94dbf0953cea75fd38c","_nodeVersion":"20.8.1","_npmVersion":"10.1.0","dist":{"integrity":"sha512-o33b+3g+RQyQoWJz6oot02Hn6+e+fWt3wM/ANhpMiizKRhZ7dzo1qcbfHkL28nHnv12NJSgSYrOBOhEaTcqUrw==","shasum":"df1edbd2b36af4e69bcf19baceb19654e15a03a7","tarball":"https://registry.npmjs.org/@abdelilahakebli/vault/-/vault-1.0.6.tgz","fileCount":4,"unpackedSize":6752,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHWoNaW0PE/W/s0FU2tn0yUP0+ttdHSApv4Qs7UYUVqiAiBqbAn0I6H10VdlojWtF/2Kbbsdux8+WiUqy3Iv6fXqOA=="}]},"_npmUser":{"name":"abdelilahakebli","email":"abdelilahworkset@gmail.com"},"directories":{},"maintainers":[{"name":"abdelilahakebli","email":"abdelilahworkset@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vault_1.0.6_1700402654682_0.9229560230142015"},"_hasShrinkwrap":false},"1.0.7":{"name":"@abdelilahakebli/vault","version":"1.0.7","description":"In memory key value pair database with encryption.","main":"src/index.js","type":"commonjs","scripts":{"build":"tsc","watch":"tsc -w","test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/abdelilahakebli/vault.git"},"keywords":["memory","database","security"],"author":{"name":"https://github.com/abdelilahakebli/"},"license":"ISC","bugs":{"url":"https://github.com/abdelilahakebli/vault/issues"},"homepage":"https://github.com/abdelilahakebli/vault#readme","devDependencies":{"@types/node":"^20.9.2","typescript":"^5.2.2"},"dependencies":{"crypto":"^1.0.1"},"_id":"@abdelilahakebli/vault@1.0.7","gitHead":"eadc3235fc40fc7b9dd022b7f28bf6154dfc3b0c","_nodeVersion":"20.8.1","_npmVersion":"10.1.0","dist":{"integrity":"sha512-jzwvErP9JUkAVOyV5PmfPx6kTAnytVVtWqIcekNbN5ItoJ9WkbE136NLt5q5eAsNO1E15T4znJZx/FJMAu92nA==","shasum":"21388863e71ec5cb5f9c3e645003a5e45334667f","tarball":"https://registry.npmjs.org/@abdelilahakebli/vault/-/vault-1.0.7.tgz","fileCount":4,"unpackedSize":6756,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDrhs3BE9y+qYZIC/tv30gYa3x+21rULwiZwPVShvCJMwIgGggcEK71IMSLPC/cz07kSW6OOlVWZOJysMtt5Ya5O1w="}]},"_npmUser":{"name":"abdelilahakebli","email":"abdelilahworkset@gmail.com"},"directories":{},"maintainers":[{"name":"abdelilahakebli","email":"abdelilahworkset@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vault_1.0.7_1700403203349_0.08889166967645856"},"_hasShrinkwrap":false},"1.0.8":{"name":"@abdelilahakebli/vault","version":"1.0.8","description":"In memory key value pair database with encryption.","main":"src/index.js","type":"commonjs","scripts":{"build":"tsc","watch":"tsc -w","test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/abdelilahakebli/vault.git"},"keywords":["memory","database","security"],"author":{"name":"https://github.com/abdelilahakebli/"},"license":"MIT","bugs":{"url":"https://github.com/abdelilahakebli/vault/issues"},"homepage":"https://github.com/abdelilahakebli/vault#readme","devDependencies":{"@types/node":"^20.9.2","typescript":"^5.2.2"},"dependencies":{"crypto":"^1.0.1"},"_id":"@abdelilahakebli/vault@1.0.8","gitHead":"485f975d00c22bb6974957140f4ae6756ba0d14a","_nodeVersion":"20.8.1","_npmVersion":"10.1.0","dist":{"integrity":"sha512-JkuItT8xH4+ffR0PuW/WYI4hoUwy0swKr/2tYp6n06AVxNCTYK+89vnEIoYzjZir4Yn6HGRJxwJv8CzW2ndyWg==","shasum":"798b23bc1997ce3174a8ceb325e48733cea06421","tarball":"https://registry.npmjs.org/@abdelilahakebli/vault/-/vault-1.0.8.tgz","fileCount":4,"unpackedSize":6756,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCMbUXhYs4AEXhf3nAvePQ3/7LgJr2RWlHNN1By7NMhSAIgFOZskSGpqID5XbXtTRO3df6RoNWRgNrKdQBhKTFzaMY="}]},"_npmUser":{"name":"abdelilahakebli","email":"abdelilahworkset@gmail.com"},"directories":{},"maintainers":[{"name":"abdelilahakebli","email":"abdelilahworkset@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vault_1.0.8_1700403291119_0.8009964874039266"},"_hasShrinkwrap":false}},"time":{"created":"2023-11-19T13:18:47.450Z","1.0.0":"2023-11-19T13:18:47.695Z","modified":"2023-11-19T14:14:51.441Z","1.0.1":"2023-11-19T13:33:41.156Z","1.0.2":"2023-11-19T13:37:37.693Z","1.0.3":"2023-11-19T13:51:31.576Z","1.0.4":"2023-11-19T13:55:23.494Z","1.0.5":"2023-11-19T13:57:14.672Z","1.0.6":"2023-11-19T14:04:14.891Z","1.0.7":"2023-11-19T14:13:23.518Z","1.0.8":"2023-11-19T14:14:51.286Z"},"maintainers":[{"name":"abdelilahakebli","email":"abdelilahworkset@gmail.com"}],"description":"In memory key value pair database with encryption.","homepage":"https://github.com/abdelilahakebli/vault#readme","keywords":["memory","database","security"],"repository":{"type":"git","url":"git+https://github.com/abdelilahakebli/vault.git"},"author":{"name":"https://github.com/abdelilahakebli/"},"bugs":{"url":"https://github.com/abdelilahakebli/vault/issues"},"license":"MIT","readme":"# Vault - In-Memory Key-Value Pair Database\n\nVault is a lightweight, in-memory key-value pair database for Node.js written in TypeScript. It utilizes the Node.js crypto module to provide basic encryption and decryption of stored values, ensuring data security.\n\n## Features\n\n- **In-Memory Storage**: Vault stores key-value pairs in memory, making it suitable for small-scale applications that require a simple and fast data store.\n\n- **Encryption**: All stored values are encrypted using the Advanced Encryption Standard (AES) algorithm in CBC mode, providing a layer of security for sensitive data.\n\n- **Hashing**: The secret key is hashed using the SHA-256 algorithm, and the secret initialization vector (IV) is hashed using the MD5 algorithm.\n\n## Installation\n\nTo use Vault in your Node.js project, install it using npm:\n\n```bash\nnpm install @abdelilahakebli/vault\n```\n\n## Usage\n\n```javascript\nconst Vault = require(\"@abdelilahakebli/vault\")\n\n// Create a new Vault instance with a secret key\nconst vault = new Vault(\"your-secret-key\");\n\n// Set a key-value pair\nconst encryptedValue = vault.set(\"username\", \"john_doe\");\nconsole.log(\"Encrypted Value:\", encryptedValue);\n\n// Retrieve a value\nconst decryptedValue = vault.get(\"username\");\nconsole.log(\"Decrypted Value:\", decryptedValue);\n\n// Delete a key-value pair\nconst isDeleted = vault.delete(\"username\");\nconsole.log(\"Deleted:\", isDeleted);\n```\n\n## API\n\n### `constructor(secret_key: string, secret_iv?: string)`\n\n- `secret_key`: The secret key used for encryption.\n- `secret_iv`: (Optional) The secret initialization vector (IV) used for encryption. If not provided, a random IV will be generated.\n\n### `set(key: string, value: string): string`\n\n- Encrypts and stores the value associated with the given key. Returns the encrypted value.\n\n### `get(key: string): string`\n\n- Retrieves the decrypted value associated with the given key.\n\n### `delete(key: string): boolean`\n\n- Deletes the key-value pair associated with the given key. Returns `true` if the deletion is successful, otherwise `false`.\n\n## Contributing\n\nContributions are welcome! Feel free to open issues, submit pull requests, or suggest new features.\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).","readmeFilename":"README.md"}