Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tamimsalem/CryptoN
A simple library that makes it easier to do few basic crypto tasks.
https://github.com/tamimsalem/CryptoN
Last synced: 3 months ago
JSON representation
A simple library that makes it easier to do few basic crypto tasks.
- Host: GitHub
- URL: https://github.com/tamimsalem/CryptoN
- Owner: tamimsalem
- License: mit
- Created: 2016-02-05T20:23:28.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2023-07-28T23:07:49.000Z (over 1 year ago)
- Last Synced: 2024-07-03T04:07:00.207Z (7 months ago)
- Language: C#
- Homepage:
- Size: 12.7 KB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-jordan - CryptoN - A simple library that makes it easier to do essential crypto tasks. A bit stale. (C#)
README
# CryptoN
A simple class that makes it easier to do few basic crypto tasks.At this stage, its quite basic, and its hardcoded to use Rijndael as a symmetric algorithm.
Functionality so far:
- Encrypting/Decrypting byte arrays.
- Encrypting/Decrypting strings.
- Encrypting/Decrypting files.
- Encrypting/Decrypting streams.
- Random Key and IV generation
- Extension methods to convert back and to Base64 and Hex Encoded stringsPlans for future expansion are underway.
#Nuget
You can find the build package on nuget here: https://www.nuget.org/packages/CryptoN
#Sample Code
```C#
var key = CryptoMonkey.GenerateRandomKey(AllowedKeySizes.KL_192);
var iv = CryptoMonkey.GenerateRandomIv(AllowedBlockSizes.BL_128);var monkey = new CryptoMonkey(key, iv);
var testString = "Hello World";
var encryptedBase64String = monkey.EncryptString(testString);
var decryptedString = monkey.DecryptString(encryptedBase64String);
```