{"id":16648844,"url":"https://github.com/fajarkim/node-openssl-enc","last_synced_at":"2025-10-28T07:12:07.042Z","repository":{"id":214702005,"uuid":"737162249","full_name":"FajarKim/node-openssl-enc","owner":"FajarKim","description":"A Node.js CLI tool and library for encryption and decryption with OpenSSL Enc.","archived":false,"fork":false,"pushed_at":"2025-07-08T01:59:41.000Z","size":288,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-08T04:23:53.892Z","etag":null,"topics":["cipher","compress","cryptography","decipher","decompress","decrypt","encrypt","node","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FajarKim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null},"funding":{"github":["FajarKim"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://buymeacoffee.com/fajarkim","https://trakteer.id/fajarkim"]}},"created_at":"2023-12-30T03:02:24.000Z","updated_at":"2025-06-30T23:02:45.000Z","dependencies_parsed_at":"2024-02-12T20:24:35.071Z","dependency_job_id":"574e2341-1cd4-4768-9fc6-6f3b85f37674","html_url":"https://github.com/FajarKim/node-openssl-enc","commit_stats":null,"previous_names":["fajarkim/node-openssl-enc"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/FajarKim/node-openssl-enc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FajarKim%2Fnode-openssl-enc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FajarKim%2Fnode-openssl-enc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FajarKim%2Fnode-openssl-enc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FajarKim%2Fnode-openssl-enc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FajarKim","download_url":"https://codeload.github.com/FajarKim/node-openssl-enc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FajarKim%2Fnode-openssl-enc/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266267290,"owners_count":23902334,"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":["cipher","compress","cryptography","decipher","decompress","decrypt","encrypt","node","nodejs"],"created_at":"2024-10-12T09:05:35.559Z","updated_at":"2025-10-28T07:12:06.941Z","avatar_url":"https://github.com/FajarKim.png","language":"JavaScript","readme":"## Node OpenSSL Enc\n\n![Logo](https://raw.githubusercontent.com/FajarKim/node-openssl-enc/master/image/logo.svg)\n\nA Node.js CLI tool and library for encryption and decryption with OpenSSL Enc.\n\n[![NPM Version](https://img.shields.io/npm/v/@fajarkim/node-openssl-enc?labelColor=302d41\u0026color=ed8796\u0026logoColor=d9e0ee\u0026style=for-the-badge\u0026logo=npm)](https://www.npmjs.com/package/@fajarkim/node-openssl-enc)\n[![Stars](https://custom-icon-badges.demolab.com/github/stars/FajarKim/node-openssl-enc?label=Stars\u0026logo=star\u0026labelColor=302d41\u0026color=c9cbff\u0026logoColor=d9e0ee\u0026style=for-the-badge)](https://github.com/FajarKim/node-openssl-enc/stargazers/)\n[![Forks](https://custom-icon-badges.demolab.com/github/forks/FajarKim/node-openssl-enc?label=Forks\u0026logo=fork\u0026labelColor=302d41\u0026color=b5e8e0\u0026logoColor=d9e0ee\u0026style=for-the-badge)](https://github.com/FajarKim/node-openssl-enc/network/members/)\n[![Issues](https://custom-icon-badges.demolab.com/github/issues/FajarKim/node-openssl-enc?label=Issues\u0026labelColor=302d41\u0026color=f5a97f\u0026logoColor=d9e0ee\u0026logo=issue\u0026style=for-the-badge)](https://github.com/FajarKim/node-openssl-enc/issues)\n[![Download Size](https://custom-icon-badges.demolab.com/github/languages/code-size/FajarKim/node-openssl-enc?label=Download\u0026logo=download\u0026labelColor=302d41\u0026color=b7bdf8\u0026logoColor=d9e0ee\u0026style=for-the-badge)](https://github.com/FajarKim/node-openssl-enc/archive/refs/heads/master.zip)\n\n### Introduction\n\nIn the dynamic and ever-evolving realm of cybersecurity, data encryption serves as an indispensable shield against potential threats and unauthorized access. Node.js developers find themselves equipped with a library similar to OpenSSL, namely Crypto. Within the vast expanse of OpenSSL tools, OpenSSL Enc takes center stage, offering a command-line interface for symmetric encryption and decryption. Therefore, we have created a similar tool specifically designed for data encryption and decryption using Node.js, known as Node OpenSSL Enc.\n\n### Installation\nMaybe on some systems or versions of Node.js there will be an error when running this tool.  You don't need to worry, follow these steps:\n- Copy this code\n  ```shell\n  export NODE_OPTIONS=--openssl-legacy-provider\n  ```\n- Paste the code to file `.bashrc` or `.zshrc`.\n- Reload your terminal again.\n\nIf so, you can now carry out the installation:\n- Library Node.js\n  ```shell\n  npm install @fajarkim/node-openssl-enc\n  ```\n- Command CLI\n  ```shell\n  npm -g install @fajarkim/node-openssl-enc\n  ```\n\n### Usage\nTo start using Node OpenSSL, follow these steps:\n- Library Node.js\n  ```javascript\n  const { encrypt, decrypt } = require(\"@fajarkim/node-openssl-enc\");\n  ```\n  Example usage:\n  ```javascript\n  const { encrypt, decrypt } = require(\"@fajarkim/node-openssl-enc\");\n  \n  const algorithm = \"aes-128-cbc\";\n  const text = \"Hello, World!\";\n  const pass = \"secret\";\n  \n  const encrypted = encrypt(algorithm, text, pass);\n  const decrypted = decrypt(algorithm, encrypted, pass);\n  \n  console.log(encrypted);\n  // \u003cBuffer 53 61 6c 74 65 64 5f 5f 72 d1 cb 35 ce 39 76 e1 c6 b2 00 88 d5 47 b5 d9 1d dc 76 7f 0f 0c c8 fb a7 3a d7 f2 f8 21 5f c8 31 5d 56 04 ac ab 06 b7\u003e\n  \n  console.log(decrypted);\n  // Hello, World!\n  ```\n  or with extra encrypted and decrypted:\n  ```javascript\n  const { encrypt, decrypt } = require(\"@fajarkim/node-openssl-enc\");\n  \n  const algorithm = \"aes-128-cbc\";\n  const text = \"Hello, World!\";\n  const pass = \"secret\";\n  const extra = \"base64\"; // You can replace \"base64\", with \"binary\", \"hex\", or \"zlib\"\n  \n  const encrypted = encrypt(algorithm, text, pass, extra);\n  const decrypted = decrypt(algorithm, encrypted, pass, extra);\n  \n  console.log(encrypted);\n  // U2FsdGVkX19KDX5oAY11Ph3bGVCnhlvSThkR1b1+DWgUcyVSBVuO/Gb+QQ6eFp5r\n  \n  console.log(decrypted);\n  // Hello, World!\n  ```\n- Command CLI\n  ```shell\n  ncssl -h\n  ```\n  List options:\n  ```text\n  Usage: ncssl [options]\n\n  Node OpenSSL Enc (ncssl) is encryption and decryption data\n  stdin or file with OpenSSL Ciphers\n\n  Options:\n    -V, --version          output the version number\n    -c, --cipher \u003ccipher\u003e  select cipher for encrypt or decrypt\n    -f, --file \u003cfile\u003e      input path file for encrypt or decrypt\n    -p, --passkey \u003cpass\u003e   input passphrase key\n    -d, --dec              decrypted data stdin or file\n    -o, --out \u003cout\u003e        saved encryption or decryption to out file\n    -l, --list             list all supported ciphers\n    -a, --base64           extra encrypt or decrypt data stdout using base64\n    -b, --binary           extra encrypt or decrypt data stdout using binary\n    -H, --hex              extra encrypt or decrypt data stdout using hex\n    -z, --zlib             extra encrypt or decrypt data stdout using zlib\n    -s, --special \u003cmode\u003e   special tool for encryption/decryption with\n                           base64 or zlib (without cipher)\n    -h, --help             display help for command\n\n  This tool licensed under AGPL-3.0 License, see \u003chttps://github.com/FajarKim/node-openssl-enc/tree/master/LICENSE\u003e\n  Report any bugs to \u003chttps://github.com/FajarKim/node-openssl-enc/issues\u003e\n  Full documentation \u003chttps://github.com/FajarKim/node-openssl-enc#readme\u003e\n  ```\n  Example usage:\n  ```shell\n  ncssl -c aes-128-cbc -p \"secret\" -f input.txt\n  ```\n  or\n  ```shell\n  echo \"Hello, World!\" | ncssl -c aes-128-cbc -p \"secret\"\n  ```\n\n### Supported Cipher\nList supported ciphers:\n\n```text\naes128             aes-128-cbc        aes-128-ccm\naes-128-cfb        aes-128-cfb1       aes-128-cfb8\naes-128-ctr        aes-128-ecb        aes-128-gcm\naes-128-ocb        aes-128-ofb        aes192\naes-192-cbc        aes-192-ccm        aes-192-cfb\naes-192-cfb1       aes-192-cfb8       aes-192-ctr\naes-192-ecb        aes-192-gcm        aes-192-ocb\naes-192-ofb        aes256             aes-256-cbc\naes-256-ccm        aes-256-cfb        aes-256-cfb1\naes-256-cfb8       aes-256-ctr        aes-256-ecb\naes-256-gcm        aes-256-ocb        aes-256-ofb\naria128            aria-128-cbc       aria-128-ccm\naria-128-cfb       aria-128-cfb1      aria-128-cfb8\naria-128-ctr       aria-128-ecb       aria-128-gcm\naria-128-ofb       aria192            aria-192-cbc\naria-192-ccm       aria-192-cfb       aria-192-cfb1\naria-192-cfb8      aria-192-ctr       aria-192-ecb\naria-192-gcm       aria-192-ofb       aria256\naria-256-cbc       aria-256-ccm       aria-256-cfb\naria-256-cfb1      aria-256-cfb8      aria-256-ctr\naria-256-ecb       aria-256-gcm       aria-256-ofb\ncamellia128        camellia-128-cbc   camellia-128-cfb\ncamellia-128-cfb1  camellia-128-cfb8  camellia-128-ctr\ncamellia-128-ecb   camellia-128-ofb   camellia192\ncamellia-192-cbc   camellia-192-cfb   camellia-192-cfb1\ncamellia-192-cfb8  camellia-192-ctr   camellia-192-ecb\ncamellia-192-ofb   camellia256        camellia-256-cbc\ncamellia-256-cfb   camellia-256-cfb1  camellia-256-cfb8\ncamellia-256-ctr   camellia-256-ecb   camellia-256-ofb\ndes                des-cbc            des-cfb\ndes-cfb1           des-cfb8           des-ecb\ndes-ofb            des-ede            des-ede-cbc\ndes-ede-cfb        des-ede-ecb        des-ede-ofb\ndes-ede3           des-ede3-cbc       des-ede3-cfb\ndes-ede3-cfb1      des-ede3-cfb8      des-ede3-ecb\ndes-ede3-ofb       des3               desx\ndesx-cbc           id-aes128-ccm      id-aes128-gcm\nid-aes192-ccm      id-aes192-gcm      id-aes256-ccm\nid-aes256-gcm      seed               seed-cbc\nseed-cfb           seed-ecb           seed-ofb\nsm4                sm4-cbc            sm4-cfb\nsm4-ctr            sm4-ecb            sm4-ofb\n```\n\n### License\nNode OpenSSL Enc is released under the AGPL-3.0 license, which grants the following permissions:\n- Commercial use\n- Modification\n- Distribution\n- Patent use\n- Private use\n\nFor more convoluted language, see the [LICENSE](/LICENSE).\n\n### Donate\nLove the project? Please consider donating to help it improve!\n\n[![GitHub](https://img.shields.io/badge/GitHub-Sponsor-blue?labelColor=302d41\u0026color=f5bde6\u0026logo=github\u0026logoColor=d9e0ee\u0026style=for-the-badge)](https://github.com/sponsors/FajarKim/)\n[![Buy Me a Coffee](https://img.shields.io/badge/Buy%20Me%20A%20Coffee-Donate-blue?labelColor=302d41\u0026color=eed49f\u0026logo=buymeacoffee\u0026logoColor=d9e0ee\u0026style=for-the-badge)](https://buymeacoffee.com/fajarkim/)\n[![Trakteer](https://custom-icon-badges.demolab.com/badge/Trakteer-Donate-blue?labelColor=302d41\u0026color=ed8796\u0026logo=trakteerid\u0026logoColor=d9e0ee\u0026style=for-the-badge)](https://trakteer.id/fajarkim/)\n\nAre you considering supporting the project by donating to me? Please DO NOT!!\n\nPlease visit [this link](https://fajarkim.github.io/donate) and make a small donation to help the people in need. A small donation goes a long way. ❤️\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/FajarKim/FajarKim/master/images/line.svg?sanitize=true\"/\u003e\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003eMade with ❤️ and JavaScript\u003c/p\u003e\n\u003cp align=\"center\"\u003eCopyright © 2023-present Rangga Fajar Oktariansyah\u003c/p\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"/LICENSE\"\u003e\u003cimg src=\"https://custom-icon-badges.demolab.com/github/license/FajarKim/node-openssl-enc?label=License\u0026labelColor=302d41\u0026color=91d7e3\u0026logo=law\u0026logoColor=d9e0ee\u0026style=for-the-badge\" alt=\"License\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n","funding_links":["https://github.com/sponsors/FajarKim","https://buymeacoffee.com/fajarkim","https://trakteer.id/fajarkim","https://github.com/sponsors/FajarKim/","https://buymeacoffee.com/fajarkim/"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffajarkim%2Fnode-openssl-enc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffajarkim%2Fnode-openssl-enc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffajarkim%2Fnode-openssl-enc/lists"}