Is it possible to hide information somewhere in a file? For example, I need to save a GUID with each file to make it unique.
Asked
Active
Viewed 254 times
-7
-
5Why does the info need to be hidden? Is it sensitive information? Please provide more details about your scenario. – Darin Dimitrov Jun 29 '12 at 12:12
-
4What kind of file? Any file? Specific type of file? Is it a file from your application? Another application? Which one? – Roger Lipscombe Jun 29 '12 at 12:13
-
1You could note the binary hash of the file, which would be unique for each unique file. – Tom Chantler Jun 29 '12 at 12:13
2 Answers
4
I haven't tried them my self but you can try using NTFS Alternate Data Streams - .NET
Hope this helps
-
I was about to suggest that. I've done that, and it seems like a possible solution. Bear in mind ADS only work on NTFS - if a file is copied to a FAT32 drive (say disk on key) or sent over the network, the alternate streams will be stripped. – Eran Jun 29 '12 at 12:18
-
1Also you can execute command line process for adding hidden data: `ECHO "Hidden text" > ordinary_file.txt:hidden.txt` – Agnius Vasiliauskas Jun 29 '12 at 12:27
-
...and to view hidden ADS with notepad: `NOTEPAD ordinary_file.txt:hidden.txt` – Agnius Vasiliauskas Jun 29 '12 at 12:29
0
If you are wanting to write encrypted data to a text file then this MSDN article explains what to do step by step: http://support.microsoft.com/kb/307010

Kane
- 16,471
- 11
- 61
- 86