Cryptocsharp
C# lib to encrypt and decrypt data with symmetric/asymmetric algorithms
Install / Use
/learn @nagilum/CryptocsharpREADME
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
node-connect
348.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
348.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
348.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
