{"id":22640968,"url":"https://github.com/aliencube/cryptoservice","last_synced_at":"2025-04-11T22:20:41.711Z","repository":{"id":7933212,"uuid":"9322982","full_name":"aliencube/CryptoService","owner":"aliencube","description":"This library provides one-way hash and two-way encryption and decryption services.","archived":false,"fork":false,"pushed_at":"2015-05-04T12:07:48.000Z","size":812,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-25T18:15:59.905Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://github.aliencube.org/CryptoService","language":"C#","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/aliencube.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}},"created_at":"2013-04-09T14:21:46.000Z","updated_at":"2015-03-26T08:41:19.000Z","dependencies_parsed_at":"2022-08-05T20:30:09.007Z","dependency_job_id":null,"html_url":"https://github.com/aliencube/CryptoService","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliencube%2FCryptoService","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliencube%2FCryptoService/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliencube%2FCryptoService/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliencube%2FCryptoService/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aliencube","download_url":"https://codeload.github.com/aliencube/CryptoService/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248487667,"owners_count":21112191,"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":[],"created_at":"2024-12-09T04:15:23.919Z","updated_at":"2025-04-11T22:20:41.684Z","avatar_url":"https://github.com/aliencube.png","language":"C#","readme":"# CryptoService #\n\n**CryptoService** provides one-way hash and two-way encryption and decryption services.\n\n\n## Package Status ##\n\n* **[Aliencube.CryptoService](https://www.nuget.org/packages/Aliencube.CryptoService/)** [![](https://img.shields.io/nuget/v/Aliencube.CryptoService.svg)](https://www.nuget.org/packages/Aliencube.CryptoService/) [![](https://img.shields.io/nuget/dt/Aliencube.CryptoService.svg)](https://www.nuget.org/packages/Aliencube.CryptoService/)\n\n\n## Getting Started \u0026ndash; Console Application ##\n\nIn order to run **CryptoService** console app, a configuration file \u0026ndash; `Aliencube.CryptoService.ConsoleApp.exe.config` \u0026ndash; must be setup beforehand.\n\n\n### Usage ###\n\n    AlienCryptoService.exe (/e|/d) /m:\"TEXT\" [/f:FILENAME] [/o:FILENAME]\n\n\n### Parameters ###\n\n    /e             Encrypt the text or text file.\n    /d             Decrypt the text or text file.\n    /t:\"[TEXT]\"    Text to encrypt or decrypt. It must be enclosed by double quotes.\n    /f:[FILENAME]  Filename containing text to encrypt or decrypt.\n    /o:[FILENAME]  Filename to store text encrypted or decrypted.\n\n**NOTE: `/e` and `/d` cannot be used at the same time.**\n\n\n## Getting Started \u0026ndash; CryptoService Library ##\n\nIn order to use **CryptoService** in your applications, simply copy `Aliencube.CryptoService.dll` to the application's `/bin` directory or reference `Aliencube.CryptoService.dll` to your application project.\n\nAlternatively, you can download the library from [NuGet](http://nuget.org). Its package URL is []()\n\n\n### Hash Service ###\n\n.NET framework provides five different hash algorithms, `MD5`, `SHA1`, `SHA256`, `SHA384` and `SHA512`. **CryptoService** supports all those hash algorithms.\n\n```c#\nvar provider = HashProvider.SHA256           // Sets the hash algorithm to SHA256\nvar hashService = new HashService(provider); // Creates a new HashService instance\n\nvar input = \"Hello World\";                   // Sets the input text to \"Hello World\"\nvar output = hashService.Hash(input);        // Gets the hashed value to output\n\nConsole.WriteLine(\"Input: {0}\", input);\nConsole.WriteLine(\"Output: {0}\", output);\n\n// Input: Hello World\n// Output: pZGm1Av0IEBKARczz7exkNYsZb8LzaMrV7J32a2fFG4=\n```\n\nPlease note that **CryptoService** does not put salt for hashing. So it is your own responsibility to add any salt before hashing.\n\n\n### Symmetric Service ###\n\n.NET framework provides five different symmetric algorithms, `Aes`, `DES`, `RC2`, `Rijndael` and `TripleDES`. **CryptoService** supports all those symmetric algorithms.\n\n```c#\nvar provider = SymmetricProvider.Aes                   // Sets the symmetric algorithm to Aes\nvar symmetricService = new SymmetricService(provider); // Creates a new SymmetricService instance\nsymmetricService.Key = \"KEY_VALUE\";                    // Sets the key value.\nsymmetricService.Vector = \"VECTOR_VALUE\";              // Sets the vector value.\n\nvar input = \"Hello World\";                             // Sets the input text to \"Hello World\"\nvar encrypted = symmetricService.Encrypt(input);       // Gets the encrypted value to encrypted\nvar decrypted = symmetricService.Decrypt(encrypted);   // Gets the decrypted value to decrypted\n\nConsole.WriteLine(\"Input: {0}\", input);\nConsole.WriteLine(\"Encrypted: {0}\", encrypted);\nConsole.WriteLine(\"Decrypted: {0}\", decrypted);\n\n// Input: Hello World\n// Encrypted: bdwO/5C8a+pliIoIXtuzfA==\n// Decrypted: Hello World\n```\n\nDepending on the symmetric algorithm chosen, the length of key and vector are different.\n\n* `Aes`: 32/16\n* `DES`: 8/8\n* `RC2`: 16/8\n* `Rijndael`: 32/16\n* `TripleDES`: 24/8\n\nPlease note that **CryptoService** does not put salt for encryption. So it is your own responsibility to add any salt before encryption.\n\n\n## License ##\n\n**CryptoService** is released under the [MIT License](http://opensource.org/licenses/MIT).\n\n\u003e The MIT License (MIT)\n\u003e Copyright (c) 2013 [aliencube.org](http://aliencube.org)\n\u003e \n\u003e Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\u003e \n\u003e The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\u003e \n\u003e THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faliencube%2Fcryptoservice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faliencube%2Fcryptoservice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faliencube%2Fcryptoservice/lists"}