We have some C++ code that uses the crypto C++ library (www.cryptocpp.com
). That library uses a passphrase to generate an HMAC/SHA1 hash which feeds (somehow) into the DES-EDE2 algorithm as a key.
I need to reimplement this in C# but I don't completely understand the HMAC/SHA1 part and how such a hash is passed into the encryption/decryption functions.
I know this is quite common, these libraries allow you to perforrm 3DES encryption using a passphrase, I just can't figure out how to tie it all together so i thought i would ask here.
How do i take the output of the hmacsha1 class and feed it as input (key and IV) to the TripleDESCryptoProvider methods?
The only values i have are the passphrase and the string to encrypt