pastebin

Paste Search Dynamic
Recent pastes
Decrypt
  1. using system;
  2. using system.IO;
  3. using system.Text;
  4. using system.Security.Cryptography;
  5.  
  6.  
  7. namespace Rextester
  8. {
  9.     public class Program
  10.     {
  11.         public static void Main(string[] args)
  12.         {          
  13.             Console.WriteLine(Decrypt("mfyJCIiTg8CiPTU38g88EQ=="));
  14.         }
  15.         public static string Decrypt(string cipherText)
  16.         {
  17.             string EncryptionKey = "MAKV2SPBNI99212";
  18.             byte[] cipherBytes = Convert.FromBase64String(cipherText);
  19.             using (Aes encryptor = Aes.Create())
  20.             {
  21.                 Rfc2898DeriveBytes pdb = new Rfc2898DeriveBytes(EncryptionKey, new byte[] { 0x49, 0x76, 0x61, 0x6e, 0x20, 0x4d, 0x65, 0x64, 0x76, 0x65, 0x64, 0x65, 0x76 });
  22.                 encryptor.Key = pdb.GetBytes(32);
  23.                 encryptor.IV = pdb.GetBytes(16);
  24.                 using (MemoryStream ms = new MemoryStream())
  25.                 {
  26.                     using (CryptoStream cs = new CryptoStream(ms, encryptor.CreateDecryptor(), CryptoStreamMode.Write))
  27.                     {
  28.                         cs.Write(cipherBytes, 0, cipherBytes.Length);
  29.                         cs.Close();
  30.                     }
  31.                     cipherText = Encoding.Unicode.GetString(ms.ToArray());
  32.                 }
  33.             }
  34.             return cipherText;
  35.         }
  36.     }
  37. }
Parsed in 0.021 seconds