Hii friends
Well i am working on hex values of a file.Now to test it i delete single byte and then try to write the file using the remaining bytes.Well the file gets corrupted but still the file is constructed.
So is there any code with which i can test if a file is corrupted or not???
I am only talking about resource files.....
kylelendo -4 Junior Poster in Training
Recommended Answers
Jump to PostHow you define file is corrupt ?
Jump to PostI suggest comparing checksums of the original file and the possibly corrupted file. Resulting hash values are easy to store and you can validate corrupted file even without the original file.
.NET has a few suitable hash functions like SHA1 and SHA256 (see System.Security.Cryptography namespace). CRC32 is not provided …
Jump to PostHash values are calculated with hash functions like SHA1, SHA256, MD5 etc. See hash functions explained.
For example, I have two sets of hex values and calculate SHA1 from them:
00000000h: 44 …
All 9 Replies
debasisdas 580 Posting Genius Featured Poster
kylelendo -4 Junior Poster in Training
codeorder 197 Nearly a Posting Virtuoso
kylelendo -4 Junior Poster in Training
codeorder 197 Nearly a Posting Virtuoso
Teme64 215 Veteran Poster
kylelendo -4 Junior Poster in Training
kylelendo -4 Junior Poster in Training
Teme64 215 Veteran Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.