using System.Security.Cryptography;
public static void Main()
var decrypter = new Decrypter();
Console.WriteLine(decrypter.Decrypt(""));
public string Decrypt(string encryptedString)
var iv = Convert.FromBase64String(encryptedString.Split('$')[0]);
var encrypted = Convert.FromBase64String(encryptedString.Split('$')[1]);
var base64Key = "/3oaB4CloWM7kI5navVllNsDK076d9C1aaFBInGCI04=";
var key = Convert.FromBase64String(base64Key);
var decryptedString = DecryptStringFromBytesAes(encrypted, key, iv);
private string DecryptStringFromBytesAes(byte[] cipherText, byte[] Key, byte[] IV)
if (cipherText == null || cipherText.Length <= 0)
throw new ArgumentNullException("cipherText");
if (Key == null || Key.Length <= 0)
throw new ArgumentNullException("Key");
if (IV == null || IV.Length <= 0)
throw new ArgumentNullException("IV");
using (Aes aesAlg = Aes.Create())
ICryptoTransform decryptor = aesAlg.CreateDecryptor(aesAlg.Key, aesAlg.IV);
using (MemoryStream msDecrypt = new MemoryStream(cipherText))
using (CryptoStream csDecrypt = new CryptoStream(msDecrypt, decryptor, CryptoStreamMode.Read))
using (StreamReader srDecrypt = new StreamReader(csDecrypt))
plaintext = srDecrypt.ReadToEnd();