Celldet

Celldet

  • NA
  • 34
  • 0

File saving

Nov 18 2008 9:35 AM
I have a process whereas I need to save a string from a textbox to a temp file and then hashing the file via SHA1.  I have that handled but when I create the file and write the data to the file 08 39 01 62 30 21 12 69 09 it is written in ascii and I need it written in hex as is.  So if you opened the file up in a hex editor you would see "08 39 01 62 30 21 12 69 09" with the ascii as .9.b0!.i. .
Currently I am only getting 30382033392030312036322033302032312031322036392030390D0A as my hex string in the hex editor and obviously hashing that value will not match the hash of  h08 h39 h01 h62 h30 h21 h12 h69 h09

Thanks for any and all help.

Answers (2)