Questions tagged [checksum]

A checksum or hash sum is a fixed-size datum computed from an arbitrary block of digital data for the purpose of detecting accidental errors that may have been introduced during its transmission or storage. The integrity of the data can be checked at any later time by recomputing the checksum and comparing it with the stored one.

A checksum or hash sum is a fixed-size datum computed from an arbitrary block of digital data for the purpose of detecting accidental errors that may have been introduced during its transmission or storage.

The integrity of the data can be checked at any later time by recomputing the checksum and comparing it with the stored one. This process doesn't guarentee the data hasn't been corrupted, but is a good indication.

1882 questions
27
votes
3 answers

Artifactory upload with checksum

If you upload an artifact to Artifactory and don't provide a checksum, it gives this warning: How do you upload with curl and include a checksum?
spuder
  • 17,437
  • 19
  • 87
  • 153
26
votes
10 answers

Fast open source checksum for small strings

I need a quick checksum (as fast as possilbe) for small strings (20-500 chars). I need the source code and that must be small! (about 100 LOC max) If it could generate strings in Base32/64. (or something similar) it would be perfect. Basically the…
Robin Rodricks
  • 110,798
  • 141
  • 398
  • 607
26
votes
2 answers

Checksum on string

Is there a way to calculate a checksum on a string in Linux? The checksum commands that I have seen (cksum, md5sum, sha1sum, etc.) all require a file as input and I do not have a file. I only have a path to a location and want to calculate the…
Sharon
  • 263
  • 1
  • 3
  • 4
26
votes
6 answers

Get a file SHA256 Hash code and Checksum

Previously I asked a question about combining SHA1+MD5 but after that I understand calculating SHA1 and then MD5 of a lagrge file is not that faster than SHA256. In my case a 4.6 GB file takes about 10 mins with the default implementation SHA256…
Mohammad Sina Karvandi
  • 1,064
  • 3
  • 25
  • 44
25
votes
3 answers

What hash algorithms are parallelizable? Optimizing the hashing of large files utilizing on multi-core CPUs

I'm interested in optimizing the hashing of some large files (optimizing wall clock time). The I/O has been optimized well enough already and the I/O device (local SSD) is only tapped at about 25% of capacity, while one of the CPU cores is…
DanO
  • 2,526
  • 2
  • 32
  • 38
25
votes
2 answers

Trying to reverse engineer a packet checksum/CRC/hash

I have an old, no longer manufactured electronic device with a serial port. I am trying to reverse engineer the data packet CRC/checksum/hash used in this device. Anyone with keen eyes, sharp math skills out there who might be able to crack this…
MSunstrum
  • 251
  • 3
  • 5
24
votes
5 answers

How is a 1s complement checksum useful for error detection?

A checksum can be generated simply by adding bits. How is the extra step of taking the 1s complement useful? I understand the theory. I know how to calculate 1s complement and I know about how adding the complements makes the result all 1s. I would…
node ninja
  • 31,796
  • 59
  • 166
  • 254
24
votes
2 answers

How can I prove to an outside party that a data file hasn't been tampered with?

We have a C#-based web service that receives documents from political organizations which are legally binding documents. Currently, we provide a receipt to the filer which contains a checksum of the file received, so we can prove to the filer at a…
David Montgomery
  • 1,618
  • 15
  • 28
23
votes
5 answers

How reliable is the adler32 checksum?

I wonder how reliable the adler32 checksum is, compared to e.g. md5 checksums? It was told on wikipedia that adler32 is "much less reliable" than md5, so I wonder how much, and in which way? More specifically, I'm wondering if it is reliable enough…
Samuel Lampa
  • 4,336
  • 5
  • 42
  • 63
23
votes
5 answers

How do I check if a string is a valid md5 or sha1 checksum string

I don't want to calculate a file's checksum, just to know if a given string is a valid checksum
yossis
  • 1,243
  • 2
  • 11
  • 11
23
votes
13 answers

Best way to generate order numbers for an online store?

Every order in my online store has a user-facing order number. I'm wondering the best way to generate them. Criteria include: Short Easy to say over the phone (e.g., "m" and "n" are ambiguous) Unique Checksum (overkill? Useful?) Edit: Doesn't…
Tom Lehman
  • 85,973
  • 71
  • 200
  • 272
22
votes
11 answers

How to generate a checksum for an java object

I'm looking for a solution to generate a checksum for any type of Java object, which remains the same for every execution of an application that produces the same object. I tried it with Object.hashCode(), but the api says ....This integer need not…
Alex
  • 4,033
  • 9
  • 37
  • 52
21
votes
5 answers

How to calculate Internet checksum?

I have a question regarding how the Internet checksum is calculated. I couldn't find any good explanation from the book, so I ask it here. Have a look at the following example. The following two messages are sent: 10101001 and 00111001. The checksum…
starcorn
  • 8,261
  • 23
  • 83
  • 124
21
votes
2 answers

CRC Calculation Of A Mostly Static Data Stream

Background: I have a section of memory, 1024 bytes. The last 1020 bytes will always be the same. The first 4 bytes will change (serial number of a product). I need to calculate the CRC-16 CCITT (0xFFFF starting, 0x1021 mask) for the entire…
mblem22
  • 313
  • 2
  • 5
21
votes
3 answers

Verify Android apk has not been repackaged?

Looking to improved the security of my Android app to flag if the .apk has been extracted, modified, repacked and resigned. Here's article from Zdnet noting the issue link1. The concern is if the app is targeted by hackers they could add malicious…
scottyab
  • 23,621
  • 16
  • 94
  • 105