{"id":23453630,"url":"https://github.com/nexckycort/rijndael-nodejs","last_synced_at":"2025-10-28T08:11:51.896Z","repository":{"id":57130140,"uuid":"384110729","full_name":"nexckycort/rijndael-nodejs","owner":"nexckycort","description":"Implementation of the rijndael encryption algorithm.🛡️","archived":false,"fork":false,"pushed_at":"2021-11-02T14:16:07.000Z","size":594,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-21T13:58:29.744Z","etag":null,"topics":["cryptography","nodejs","typescript","webpack"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@nexckycort/rijndael-nodejs","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nexckycort.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-08T12:04:24.000Z","updated_at":"2025-04-25T01:17:28.000Z","dependencies_parsed_at":"2022-08-26T21:41:46.162Z","dependency_job_id":null,"html_url":"https://github.com/nexckycort/rijndael-nodejs","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/nexckycort/rijndael-nodejs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nexckycort%2Frijndael-nodejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nexckycort%2Frijndael-nodejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nexckycort%2Frijndael-nodejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nexckycort%2Frijndael-nodejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nexckycort","download_url":"https://codeload.github.com/nexckycort/rijndael-nodejs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nexckycort%2Frijndael-nodejs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281403948,"owners_count":26495154,"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-10-28T02:00:06.022Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":["cryptography","nodejs","typescript","webpack"],"created_at":"2024-12-24T02:19:09.231Z","updated_at":"2025-10-28T08:11:51.866Z","avatar_url":"https://github.com/nexckycort.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rijndael-nodejs\r\n\r\nImplementation of the rijndael encryption algorithm.\r\n\r\n| Statements                                                                    | Branches                                                                  | Functions                                                                   | Lines                                                               |\r\n| ----------------------------------------------------------------------------- | ------------------------------------------------------------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------- |\r\n| ![Statements](https://img.shields.io/badge/statements-100%25-brightgreen.svg?style=flat) | ![Branches](https://img.shields.io/badge/branches-100%25-brightgreen.svg?style=flat) | ![Functions](https://img.shields.io/badge/functions-100%25-brightgreen.svg?style=flat) | ![Lines](https://img.shields.io/badge/lines-100%25-brightgreen.svg?style=flat) |\r\n\r\n## Install\r\n\r\n```npm\r\nnpm install @nexckycort/rijndael-nodejs\r\n```\r\n\r\n## Usage\r\n\r\n```javascript\r\nimport rijndael from '@nexckycort/rijndael-nodejs'\r\n\r\nconst saltBytes = Buffer.from('salttest', 'ascii')\r\nconst key = 'keytest'\r\nconst algorithm = 'aes256'\r\n\r\nconst encryptRijndael = rijndael(saltBytes, key, algorithm)\r\n\r\nconst text = 'test'\r\nconst encryptText = encryptRijndael(text)\r\nconsole.log(encryptText) // output: gv/aprKdK7hm/s91m1VW8w==\r\n```\r\n\r\n## Example in csharp\r\n\r\n```csharp\r\nusing System;\r\n\r\nusing System.IO;\r\nusing System.Security.Cryptography;\r\nusing System.Text;\r\n\r\nnamespace rijndael_csharp {\r\n    class Program {\r\n        static void Main(string[] args) {\r\n            var encryptText = rijndael(\"test\");\r\n            Console.WriteLine(encryptText); // output: gv/aprKdK7hm/s91m1VW8w==\r\n        }\r\n\r\n        public static string rijndael(String password) {\r\n\r\n            byte[] saltBytes = Encoding.ASCII.GetBytes(\"salttest\");\r\n            Rfc2898DeriveBytes key = new Rfc2898DeriveBytes(\"keytest\", saltBytes);\r\n            RijndaelManaged rijAlg = new RijndaelManaged();\r\n            rijAlg.Key = key.GetBytes(rijAlg.KeySize / 8);\r\n            rijAlg.IV = key.GetBytes(rijAlg.BlockSize / 8);\r\n\r\n            byte[] encrypted;\r\n\r\n            ICryptoTransform encryptor = rijAlg.CreateEncryptor(rijAlg.Key, rijAlg.IV);\r\n\r\n            using (MemoryStream msEncrypt = new MemoryStream()) {\r\n                using (CryptoStream csEncrypt = new CryptoStream(msEncrypt, encryptor, CryptoStreamMode.Write)) {\r\n                    using (StreamWriter swEncrypt = new StreamWriter(csEncrypt)) {\r\n                        swEncrypt.Write(password);\r\n                    }\r\n                    encrypted = msEncrypt.ToArray();\r\n                }\r\n            }\r\n            return Convert.ToBase64String(encrypted);\r\n        }\r\n    }\r\n}\r\n```\r\n\r\n# Contributing\r\n\r\nIf someone wants to add or improve something, I invite you to collaborate directly in this repository: [@nexckycort/rijndael-nodejs](https://github.com/nexckycort/rijndael-nodejs)\r\n\r\n# License\r\n\r\n@nexckycort/rijndael-nodejs is released under the [MIT License](https://opensource.org/licenses/MIT).\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnexckycort%2Frijndael-nodejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnexckycort%2Frijndael-nodejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnexckycort%2Frijndael-nodejs/lists"}