Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » Incorrect SHA1 checksum for files 4GB+
Re: Incorrect SHA1 checksum for files 4GB+ [message #50005 is a reply to message #50002] Sat, 16 June 2018 11:19 Go to previous messageGo to previous message
Zbych is currently offline  Zbych
Messages: 327
Registered: July 2009
Senior Member
I've made some further tests:
1. reading and writing file using Upp's stream - no difference between original file and copy was detected.
2. replace Upp's sha1 with some random sha1 from git: https://github.com/clibs/sha1 - now checksum is the same as from sha1sum.
3. optimization level doesn't change result (both Upp's sha1 and git's)

Test app that calculates sha1 using Upp and git version at the same time is attached.

4GB file:
16.06.2018 11:11:27 File '/tmp/file4GB.bin' sha1 calculation started
16.06.2018 11:12:03 UPP SHA1: 1e4aca8da9f53733575cd351347b6a054a098bf5
16.06.2018 11:12:03 GIT SHA1: d43db14ac2c197da7d4d0048105f2af0bcb75f0b

$ sha1sum /tmp/file4GB.bin 
d43db14ac2c197da7d4d0048105f2af0bcb75f0b  /tmp/file4GB.bin


File smaller than 4GB:
16.06.2018 11:17:39 File '/tmp/file4GB-.bin' sha1 calculation started
16.06.2018 11:18:16 UPP SHA1: 30c411fa4ca4ed06b54ecb6143abcd39f2c32591
16.06.2018 11:18:16 GIT SHA1: 30c411fa4ca4ed06b54ecb6143abcd39f2c32591

$ sha1sum /tmp/file4GB-.bin 
30c411fa4ca4ed06b54ecb6143abcd39f2c32591  /tmp/file4GB-.bin

  • Attachment: sha1test.zip
    (Size: 4.43KB, Downloaded 212 times)

[Updated on: Sat, 16 June 2018 11:27]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Core Http API change proposals - HttpStatus and HttpMethod as enum class
Next Topic: RegExp this'n that
Goto Forum:
  


Current Time: Mon Jun 10 09:18:46 CEST 2024

Total time taken to generate the page: 0.01778 seconds