i am trying to display the byte[] in the text box, first i am reading all the encrypted info from the file temp.enc to the byte array
FileStream f = File.OpenRead("temp.enc");
byte[] b = new byte[f.Length];//length is 32 bytes
f.Read(b, 0, Convert.ToInt32(f.Length));
f.Close();
second i try to display the content on to the text box, when i run the program i dont see the complete data. it displays only the first 23 bytes of data
outputFileTextBox.Text = System.Text.Encoding.Default.GetString(b);
how ever if i use the same byte array again to write the info back to file, i have all the 32bytes written on to file
BinaryWriter swEnc = new BinaryWriter(File.OpenWrite("encypt.txt"));
swEnc.Write(b);
swEnc.Close();
this is a c# windows application, i m not sure what i am doing wrong.