Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

Awesome Lists containing this project

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 strings

Plans 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);
```