{"id":27777825,"url":"https://github.com/sajadtroy/auralab","last_synced_at":"2026-02-05T13:32:28.349Z","repository":{"id":257809409,"uuid":"867582068","full_name":"SajadTroy/auralab","owner":"SajadTroy","description":"Auralab is a secure, encrypted login and token generation package designed for authentication workflows. It provides AES encryption and customizable token expiration handling, offering an alternative to JWT. Ideal for Node.js and TypeScript applications.","archived":false,"fork":false,"pushed_at":"2024-10-04T11:37:14.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-11T05:19:41.305Z","etag":null,"topics":["authentication","encryption","encryption-decryption","hash","jwt","login","npm","npm-package","signup"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SajadTroy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-04T10:36:55.000Z","updated_at":"2024-10-04T11:44:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"9d09425a-5a5e-4eb5-a9f7-16f205799cf8","html_url":"https://github.com/SajadTroy/auralab","commit_stats":null,"previous_names":["mrsajadpp/auralab","sajadtroy/auralab"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SajadTroy/auralab","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SajadTroy%2Fauralab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SajadTroy%2Fauralab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SajadTroy%2Fauralab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SajadTroy%2Fauralab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SajadTroy","download_url":"https://codeload.github.com/SajadTroy/auralab/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SajadTroy%2Fauralab/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265692748,"owners_count":23812207,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","encryption","encryption-decryption","hash","jwt","login","npm","npm-package","signup"],"created_at":"2025-04-30T07:42:31.427Z","updated_at":"2026-02-05T13:32:28.310Z","avatar_url":"https://github.com/SajadTroy.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Auralab\n\nAuralab is an NPM package that provides a secure way to encrypt and decrypt objects using a secret string, leveraging the AES-256-CBC algorithm. It is useful for implementing encrypted login mechanisms similar to JWT (JSON Web Tokens).\n\n## Features\n\n- Encrypts JavaScript objects into a secure string.\n- Decrypts the secure string back into the original object.\n- Utilizes AES-256-CBC encryption for robust security.\n- Simple and easy to use with a clear API.\n\n## Installation\n\nYou can install Auralab via npm:\n\n```bash\nnpm install auralab\n```\n\n## Usage\n\nHere is a basic example of how to use Auralab to encrypt and decrypt objects:\n\n```javascript\nconst { Auralab } = require(\"auralab\");\n\nconst aura = new Auralab(\"your_secret_string_here\");\nconsole.log(aura);\n\nconst obj = { username: 'Sajad', password: 'mypassword' };\n\n// Encrypt the object\nlet hash = aura.hash(obj);\nconsole.log('Encrypted:', hash);\n\n// Decrypt the object\nlet decoded = aura.decode(hash);\nconsole.log('Decrypted:', decoded);\n\n// Decode using a hash directly\nlet hashForDecode = \"your_hash_here\";\nlet decodedDirectly = aura.decode(hashForDecode);\nconsole.log('Decoded Directly:', decodedDirectly);\n```\n\n### Parameters\n\n- **Constructor**: `new Auralab(secret: string)`\n  - `secret`: A string used to generate the encryption key.\n\n### Methods\n\n- **`hash(obj: Object): string`**\n  - Encrypts the provided object and returns the encrypted string.\n\n- **`decode(hash: string): Object`**\n  - Decrypts the provided hash string and returns the original object.\n\n## Example\n\nHere is an example of how to encrypt and decrypt an object:\n\n```javascript\nconst { Auralab } = require(\"auralab\");\n\nconst aura = new Auralab(\"cfdgbfcyehfvbr\");\n\nconst obj = { username: 'Sajad', password: 'mypassword' };\n\n// Encrypt the object\nlet hash = aura.hash(obj);\nconsole.log('Encrypted:', hash);\n\n// Decrypt the object\nlet decoded = aura.decode(hash);\nconsole.log('Decrypted:', decoded);\n```\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsajadtroy%2Fauralab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsajadtroy%2Fauralab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsajadtroy%2Fauralab/lists"}