Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Free Pascal
»
Beginners
(Moderators:
FPK
,
Tomas Hajny
) »
How to modify file checksum?
Free Pascal
Website
Downloads
Wiki
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Bugtracker
IRC channel
Latest SVN
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
TLabeledEdit does not sho...
by
winni
[
Today
at 12:44:08 pm]
Cannot connect to https:/...
by
trev
[
Today
at 11:59:53 am]
Zeos/MariaDB: Instead of ...
by
PaulANormanNZ
[
Today
at 11:43:21 am]
case of
by
WooBean
[
Today
at 11:36:02 am]
50 years of Pascal
by
MarkMLl
[
Today
at 10:00:34 am]
How to patch FPC Library ...
by
MikeOnline
[
Today
at 09:22:03 am]
MOVED: How to download fi...
by
trev
[
Today
at 06:43:24 am]
Help Needed
by
JLWest
[
Today
at 03:20:18 am]
How to download files usi...
by
gcarreno
[
Today
at 12:52:03 am]
converting C++ over laz, ...
by
jamie
[March 05, 2021, 11:55:06 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: How to modify file checksum? (Read 574 times)
TomTom
Full Member
Posts: 115
How to modify file checksum?
«
on:
August 14, 2019, 01:06:39 pm »
Hi
I have many files that need to have their checksums changed. How can I do this? Is this even possible?
These are tif images. I know I could add single pixel at random position and checksum will change but Im wondering if there is some more elegant way (not changing image).
Logged
howardpc
Hero Member
Posts: 3646
Re: How to modify file checksum?
«
Reply #1 on:
August 14, 2019, 01:42:23 pm »
A checksum is a derived statistic.
Unless the binary representation of the file changes in some way, its checksum will not change (unless the checksum calculation algorithm is substandard).
Logged
TomTom
Full Member
Posts: 115
Re: How to modify file checksum?
«
Reply #2 on:
August 14, 2019, 01:49:54 pm »
So... I need to change something in the file like in my case, set random pixel to random color for example.. or change some meta-data... Am I right?
Logged
marcov
Global Moderator
Hero Member
Posts: 9090
FPC developer.
Re: How to modify file checksum?
«
Reply #3 on:
August 14, 2019, 01:51:51 pm »
Some checksums have certain properties. E.g. you make the file 4 bytes longer to n+4, and take the checksum of the first n bytes, and craft a value to put in the four extra bytes so that the value over n+4 bytes is what you want.
Logged
Thaddy
Hero Member
Posts: 10706
Re: How to modify file checksum?
«
Reply #4 on:
August 14, 2019, 02:35:23 pm »
If the hash is over the full TTiffIFD record, you can possibly modify the date, or one of the document properties, like the model of the scanner
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Free Pascal
»
Beginners
(Moderators:
FPK
,
Tomas Hajny
) »
How to modify file checksum?
TinyPortal
© 2005-2018