|
-
Mar 18th, 2007, 12:10 AM
#1
Thread Starter
Fanatic Member
Self-referential checksum
I have a need for two or more files to contain checksums (say, MD5) of each of the other files, such that if any one file changes, the other files will contain the old (thus incorrect) checksum.
How might I do this?
-
Mar 18th, 2007, 05:12 AM
#2
Re: Self-referential checksum
No development platform specified so unsure where to move this.
Moved from Chit Chat
-
Mar 19th, 2007, 02:24 PM
#3
Re: Self-referential checksum
You usually don't use include checksum portion of a file in the checksum. i'd suggest that you do the same thing - reserve as many bytes as you need for the checksum, then checksum the rest of the file.
If you're talking about each file just being the checksum of the other, you have what's known in hardware as a race condition, and in cartography as "you can't get there from here". In informal circles, you're said to be SOL.
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
-
Mar 19th, 2007, 03:07 PM
#4
Thread Starter
Fanatic Member
Re: Self-referential checksum
hmm... thought so... ok. now onto plan b, as stated above by somebody else...
What I really wanted to do was be able to detect if somebody was trying to change the checksum itself in one of the files.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|