I've read a few articles on doing this and I think there is a variable I'm not considering here.
I'm going through someone else's code, where they have implemented triple-des encryption. They do not have the key and iv stored somewhere as a string. Only as byte arrays.
I need to make this same encrypt/decrypt call outside of C#, so I'm trying to find out the keys used.
Things I've tried:
byte[] key; // this is set
byte[] iv; // this is set
Convert.ToBase64String(key);
Encoding.Default.GetString(key);
Encoding.ASCII.GetString(key);
Encoding.UTF8.GetString(key);
Maybe the results from one of these is correct, but I need to do another conversion to encode it?
In case it matters, I'm simply trying to use these keys with openssl via ruby or node.js.
For what it's worth, I've also tried creating an array of the bytes in ruby and doing a pack on them, but still seems like the wrong result.