{"id":22422132,"url":"https://github.com/abumq/encr","last_synced_at":"2025-07-23T14:06:17.528Z","repository":{"id":38211255,"uuid":"235732375","full_name":"abumq/encr","owner":"abumq","description":"🔒 Simple promise based encryption library and CLI using Node.js crypto module","archived":false,"fork":false,"pushed_at":"2023-07-21T01:16:52.000Z","size":44,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-04T21:23:29.235Z","etag":null,"topics":["crypto-cli","crypto-js","encryption-cli","nodejs-crypto"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abumq.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":"2020-01-23T05:55:05.000Z","updated_at":"2024-04-05T22:35:03.000Z","dependencies_parsed_at":"2024-12-05T17:12:25.051Z","dependency_job_id":"d2288aab-a8e6-46cf-8914-5f7e3359838f","html_url":"https://github.com/abumq/encr","commit_stats":null,"previous_names":["abumq/encr","amrayn/encr"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/abumq/encr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abumq%2Fencr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abumq%2Fencr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abumq%2Fencr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abumq%2Fencr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abumq","download_url":"https://codeload.github.com/abumq/encr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abumq%2Fencr/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266691580,"owners_count":23969182,"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","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["crypto-cli","crypto-js","encryption-cli","nodejs-crypto"],"created_at":"2024-12-05T17:11:48.889Z","updated_at":"2025-07-23T14:06:17.181Z","avatar_url":"https://github.com/abumq.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# encr\nSimple promise based encryption wrapper for Node.js and CLI based on crypto module\n\n\u003cp align=\"center\"\u003e\n    •   •   •\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca aria-label=\"NPM version\" href=\"https://www.npmjs.com/package/encr\"\u003e\n    \u003cimg alt=\"\" src=\"https://img.shields.io/npm/v/encr.svg?style=for-the-badge\u0026labelColor=000000\"\u003e\n  \u003c/a\u003e\n  \u003ca aria-label=\"License\" href=\"https://github.com/abumq/encr/blob/master/LICENSE\"\u003e\n    \u003cimg alt=\"\" src=\"https://img.shields.io/npm/l/encr?style=for-the-badge\u0026labelColor=000000\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    •   •   •\n\u003c/p\u003e\n\n## Installation\n\n```bash\nnpm i encr -S\n```\n\n```bash\nyarn add encr\n```\n\n## CLI\n\n```bash\n## Encrypt\nencr -i \u003cinput\u003e -o \u003coutput\u003e [--force] [--key \u003csecret\u003e] [--alg \u003calgorithm\u003e]\n\n## Decrypt\nencr -d -i \u003cinput\u003e -o \u003coutput\u003e [--force] [--key \u003csecret\u003e] [--alg \u003calgorithm\u003e]\n\n## Random generator of length (default = 32)\nencr -g \u003clength\u003e\n```\n\n### Arguments\n\n| **Arg** | **Description** |\n|--|--|\n| `-i` | Input file - this can be encrypted or plain data file |\n| `-o` | Output file. If this option is `stdout` it is output as string. Do not use this option to store to file as this will corrupt the encoding of buffer |\n| `-d` | Use this option to decrypt the input|\n| `-g` | Generate nonce|\n| `--key` | The secret key to use for encryption. Alternatively you can provide environment variable `ENCR_SECRET`. If none of these options are provided then you will be securely asked for the key |\n\nOptional arguments\n\n| **Arg** | **Description** |\n|--|--|\n| `--force` | If output file already exists, use this option to overwrite. |\n| `--alg` | Encryption algorithm to use. List depends upon OpenSSL (as per Node.js docs) Run `openssl list -cipher-algorithms` to choose the possible option. You must choose 256 bit option for correct key length. **It defaults to AES-256 CBC** |\n| `-h` | Display this list of options for convenience |\n| `-v` | Display version information |\n\n## API\n```\nconst Encr = require('encr');\n\nconst encr = new Encr('MySecret');\nconst plain = Buffer.from('Hello world');\n\nencr.encrypt(plain).then(encrypted =\u003e {\n  console.log('Encrypted:', encrypted.toString('base64'));\n  return encr.decrypt(encrypted);\n}).then(decrypted =\u003e {\n  console.log('Decrypted:', decrypted.toString());\n})\n```\n\n## License\n```\nCopyright (c) 2020 @abumq\n\nhttps://github.com/abumq/\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabumq%2Fencr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabumq%2Fencr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabumq%2Fencr/lists"}