SkillAgentSearch skills...

Cryptocsharp

C# lib to encrypt and decrypt data with symmetric/asymmetric algorithms

Install / Use

/learn @nagilum/Cryptocsharp
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Cryptography

A tiny C# library for encrypting and decrypting data using both symmetric (AES) and asymmetric (RSA) algorithms.

Symmetric (AES)

Symmetric encryption is best suited for small amounts of data.

// Set the passphrase.
const string passphrase = "This is a passphrase";

// Encrypt.
var encrypted = Cryptography.AES.Encrypt(
	"This is some text to encrypt",
	passphrase);

// Decrypt.
var decrypted = Cryptography.AES.Decrypt(
	encrypted,
	passphrase);

Asymmetric (RSA)

Asymmetric encryption is best suited for large amounts of data. With public/private key encryption you can also switch the keys if you wanted, encrypting with the private key and decrypting with the public key.

// Generate keys.
Cryptography.RSA.GenerateKeys(
	out var privateKey,
	out var publicKey,
	keySize: 2048); // The keySize is optional and defaults to 2048.

var encrypted = Cryptography.RSA.Encrypt(
	"... this is a large dataset ...",
	publicKey);

var decrypted = Cryptography.RSA.Decrypt(
	encrypted,
	privateKey);

Related Skills

View on GitHub
GitHub Stars26
CategoryDevelopment
Updated6mo ago
Forks12

Languages

C#

Security Score

87/100

Audited on Oct 2, 2025

No findings