Skip to content

Instantly share code, notes, and snippets.

View Andrei-Fogoros's full-sized avatar

Andrei-Fogoros

View GitHub Profile
@Andrei-Fogoros
Andrei-Fogoros / Encryption.cs
Created May 18, 2021 14:16 — forked from davidsheardown/Encryption.cs
.NET Core 2 Encrypt/Decrypt String
public static void Main(string[] args)
{
var content = "Example test";
var key = "E546C8DF278CD5931069B522E695D4F2";
var encrypted = EncryptString(content, key);
Console.WriteLine(encrypted);
var decrypted = DecryptString(encrypted, key);
Console.WriteLine(decrypted);