F
Fede
I have a file that contains initialization vector and key crypted with the
key 'passwd'. My problem is that when I execute the code
TripleDESCryptoServiceProvider pk = new TripleDESCryptoServiceProvider();
FileStream fin = new
FileStream("iv_key_cry.txt",FileMode.Open,FileAccess.Read);
CryptoStream encStream = new CryptoStream(fin,
passwd.CreateDecryptor(passwd.Key,passwd.IV),
CryptoStreamMode.Read);
encStream.Read(pk.IV,0,pk.IV.Length);
encStream.Read(pk.Key,0,pk.Key.Length);
pk.IV and pk.Key contain random values instead the iv-key I stored. Where is
my mistake?
key 'passwd'. My problem is that when I execute the code
TripleDESCryptoServiceProvider pk = new TripleDESCryptoServiceProvider();
FileStream fin = new
FileStream("iv_key_cry.txt",FileMode.Open,FileAccess.Read);
CryptoStream encStream = new CryptoStream(fin,
passwd.CreateDecryptor(passwd.Key,passwd.IV),
CryptoStreamMode.Read);
encStream.Read(pk.IV,0,pk.IV.Length);
encStream.Read(pk.Key,0,pk.Key.Length);
pk.IV and pk.Key contain random values instead the iv-key I stored. Where is
my mistake?