Hey All,
I know this is probably stupid question. This is what I am trying to do:
I am trying to encrypt using Twofish then I take each character and change
it into the Hex value for it. Here is what I have:
Twofish tf = new Twofish();
tf.Mode = CipherMode.ECB;
byte[] plainText = Twofish.StrToByteArray(this.TextBoxEnter.Text);
System.IO.MemoryStream ms = new System.IO.MemoryStream();
ICryptoTransform encrypt = tf.CreateEncryptor(plainText);
//Create Crypto Stream that transforms file stream using twofish encryption
CryptoStream cryptostream = new
CryptoStream(ms,encrypt,CryptoStreamMode.Write);
//write out Twofish encrypted stream
cryptostream.Write(plainText,0,plainText.Length);
cryptostream.Close();
byte[] bytOut = ms.ToArray();
string output = Twofish.ByteArrayToStr(bytOut);
//Here is where I need to convert it to hex
//Lets say the output string is #4ff&* I need to change
//Hex of each character