C# 3DES (Triple-DES) Test Vector
This post provides C# sample code for matching a test vector (known answer test). 3DES Settings: ECB Mode 192-bit key (i.e. 3 8-bit keys) ASCII Key Bytes: 1234567890123456ABCDEFGH ASCII Text to Encrypt: The quick brown fox jumped over the lazy dog Pads with zero bytes Hexadecimalized Encrypted Result: 13d4d3549493d2870f93c3e0812a06de467e1f9c0bfb16c0 70ede5cabbd3ca62f217a7ae8d47f2c7bf62eb309323b58b C# Code: string keyAscii = “1234567890123456ABCDEFGH”; byte[] key = ASCIIEncoding.ASCII.GetBytes(keyAscii); […]