Category : aescng

The C# code below outputs 0123456789012345678901234567890123456789: static void Main(string[] args) { byte[] salt = Encoding.ASCII.GetBytes("saltycrack"); Console.WriteLine(Decrypt("NpN45cs2+bVLtEgp6ZmBmmHLH89aFdHIbDjhstTK0Vb1VMr7jBsliKD9siQGGxGS", "pass", salt)); } public static string Decrypt(string encryptedText, string encryptionPassword, byte[] salt) { var algorithm = GetAlgorithm(encryptionPassword, salt); using (ICryptoTransform decryptor = algorithm.CreateDecryptor(algorithm.Key, algorithm.IV)) { byte[] encryptedBytes = Convert.FromBase64String(encryptedText); return Encoding.UTF8.GetString(InMemoryCrypt(encryptedBytes, decryptor)); } } private static byte[] InMemoryCrypt(byte[] data, ..

Read more