Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Activation
using System;
using System.Text;
using System.Security.Cryptography;
public static class AESCryption
{
public static void Main()
{
AesCryptoServiceProvider aesCryptoServiceProvider = new AesCryptoServiceProvider();
aesCryptoServiceProvider.BlockSize = 128;
aesCryptoServiceProvider.KeySize = 256;
aesCryptoServiceProvider.IV = System.Text.Encoding.ASCII.GetBytes("CTF4B7E1CTF4B7E1");
aesCryptoServiceProvider.Key = System.Text.Encoding.ASCII.GetBytes("SECCON_BEGINNERS");
aesCryptoServiceProvider.Mode = CipherMode.ECB;
aesCryptoServiceProvider.Padding = PaddingMode.PKCS7;
byte[] src = Convert.FromBase64String("E3c0Iefcc2yUB5gvPWge1vHQK+TBuUYzST7hT+VrPDhjBt0HCAo5FLohfs/t2Vf5");
using (ICryptoTransform decrypt = aesCryptoServiceProvider.CreateDecryptor())
{
Console.WriteLine(System.Text.Encoding.GetEncoding("Shift_JIS").GetString(decrypt.TransformFinalBlock(src, 0, src.Length)));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.