{"id":25381706,"url":"https://github.com/cosmos-stack/cosmos-security","last_synced_at":"2025-07-31T06:38:40.555Z","repository":{"id":55105618,"uuid":"122703122","full_name":"cosmos-stack/cosmos-security","owner":"cosmos-stack","description":"A Security Component. Provides a series of security tools, including Hashing functions and Encryption/Decryption functions.","archived":false,"fork":false,"pushed_at":"2021-09-04T12:32:57.000Z","size":2713,"stargazers_count":10,"open_issues_count":4,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-23T16:37:22.207Z","etag":null,"topics":["aes","des","dsa","encryption","hmac","md2","md4","md5","murmurhash","rc4","rcx","rsa","sha1","sm2","sm3","sm4","xxtea"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cosmos-stack.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":"Security.sln","support":null}},"created_at":"2018-02-24T04:31:19.000Z","updated_at":"2024-12-21T08:15:58.000Z","dependencies_parsed_at":"2022-08-14T12:10:22.356Z","dependency_job_id":null,"html_url":"https://github.com/cosmos-stack/cosmos-security","commit_stats":null,"previous_names":["cosmos-loops/cosmos-security","cosmos-loops/cosmos-encryption"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/cosmos-stack/cosmos-security","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cosmos-stack%2Fcosmos-security","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cosmos-stack%2Fcosmos-security/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cosmos-stack%2Fcosmos-security/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cosmos-stack%2Fcosmos-security/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cosmos-stack","download_url":"https://codeload.github.com/cosmos-stack/cosmos-security/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cosmos-stack%2Fcosmos-security/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267999932,"owners_count":24178882,"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-31T02:00:08.723Z","response_time":66,"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":["aes","des","dsa","encryption","hmac","md2","md4","md5","murmurhash","rc4","rcx","rsa","sha1","sm2","sm3","sm4","xxtea"],"created_at":"2025-02-15T06:33:06.475Z","updated_at":"2025-07-31T06:38:40.527Z","avatar_url":"https://github.com/cosmos-stack.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cosmos Security Overview \u003ca href=\"https://www.nuget.org/packages/Cosmos.Security/\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/nuget/v/Cosmos.Security.svg?style=flat\" alt=\"NuGet Version\" data-canonical-src=\"https://img.shields.io/nuget/v/Cosmos.Security.svg?style=flat\" style=\"max-width:100%;\"\u003e\u003c/a\u003e\n\n[Cosmos.Security](https://github.com/cosmos-loops/Cosmos.Security) is an inline project of [Cosmosloops labs.](https://github.com/cosmos-loops).\n\n## Install\n\nFrom NuGet:\n\n```text\nInstall-Package Cosmos.Security.Encryption\n```\n\n## Includes\n\n- MD2\n- MD4\n- MD5\n- SHA1/256/384/512\n- SM3\n- HMAC\n- MurmurHash2\n- MurmurHash3\n- Time33/DBJ33A\n- AES\n- DES/TripleDES\n- RC4\n- RCX/ThreeRCX\n- RCY/ThreeRCY\n- SM4\n- TEA/XTEA/XXTEA\n- DSA\n- RSA\n- SM2 ***(partially implement)***\n\n## Usage\n\nHAMC-SHA1:\n\n```c#\nvar signature = HMACSHA1HashingProvider.Signature(\"image\", \"alexinea\");\n```\n\nDES without salt:\n\n```c#\nvar s = DESEncryptionProvider.Encrypt(\"image\", \"alexinea\", \"forerunner\");\nAssert.Equal(\"fJ2yrnAPaH0=\", s);\n\nvar o = DESEncryptionProvider.Decrypt(s, \"alexinea\", \"forerunner\");\nAssert.Equal(\"image\", o);\n```\n\nDES with salt:\n\n```c#\nvar s = DESEncryptionProvider.Encrypt(\"image\", \"alexinea\", \"forerunner\", \"123412341234\");\nAssert.Equal(\"s4h5u8hA/2Y=\", s);\n\nvar o = DESEncryptionProvider.Decrypt(s, \"alexinea\", \"forerunner\", \"123412341234\");\nAssert.Equal(\"image\", o);\n```\n\nDES with salt and autokey\n\n```c#\nvar key = DESEncryptionProvider.CreateKey();\nvar s = DESEncryptionProvider.Encrypt(\"image\", key.Key, key.IV, \"123412341234\");\nvar o = DESEncryptionProvider.Decrypt(s, key.Key, key.IV, \"123412341234\");\nAssert.Equal(\"image\", o);\n```\n\n## Thanks\n\nPeople or projects that have made a great contribbution to this project:\n\n- [Oren Novotny](https://github.com/onovotny)\n- [Stulzq](https://github.com/stulzq)\n- _The next one must be you_\n\n### Organizations and projects\n\n- [Anarh2404/AdlerSimd](https://github.com/Anarh2404/AdlerSimd)\n- [murmurhash-net](https://github.com/darrenkopp/murmurhash-net/)\n- [odinmillion/MurmurHash.Net](https://github.com/odinmillion/MurmurHash.Net)\n- [Portable.BouncyCastle](https://github.com/onovotny/bc-csharp)\n- [Secure-Hash-Algorithms](https://github.com/TerryJackson/Secure-Hash-Algorithms) \n- [ToolGood.RCX](https://github.com/toolgood/RCX)\n- [xxtea/xxtea-dotnet](https://github.com/xxtea/xxtea-dotnet)\n\n# License\n\nMember project of [Cosmosloops labs.](https://github.com/cosmos-loops).\n\n[Apache License 2.0](/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcosmos-stack%2Fcosmos-security","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcosmos-stack%2Fcosmos-security","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcosmos-stack%2Fcosmos-security/lists"}