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
62
votes
3 answers

How can I force Liquibase to recalculate checksums without re-running the statements?

We're using Liquibase 3.2 with Java 6. Is there a way I can force Liquibase to recalculate checksums without re-running the same statements from our Liquibase files? In our database, I run this ... update DATABASECHANGELOG set md5sum = null where…
Dave A
  • 2,780
  • 9
  • 41
  • 60
58
votes
12 answers

File containing its own checksum

Is it possible to create a file that will contain its own checksum (MD5, SHA1, whatever)? And to upset jokers I mean checksum in plain, not function calculating it.
zakovyrya
  • 9,579
  • 6
  • 39
  • 28
53
votes
5 answers

Google Drive MD5 checksum for files

I'm not a programmer, just a regular user of Google Drive. I want to see if the files are uploaded correctly. I go through a whole process in the OAuth 2.0 Playground that lists all files, shows the MD5 checksums but also lots of information per…
Alex
  • 1,427
  • 2
  • 13
  • 24
46
votes
6 answers

JavaScript CRC32

I'm looking for a modern JavaScript implementation of CRC32. This implementation, which may have originated from here, and is now here, there and everywhere, is unacceptable because it's slow (500ms/MB), and depends on over 2KB of space delimited…
Adria
  • 8,651
  • 4
  • 37
  • 30
39
votes
11 answers

Robust and fast checksum algorithm?

Which checksum algorithm can you recommend in the following use case? I want to generate checksums of small JPEG files (~8 kB each) to check if the content changed. Using the filesystem's date modified is unfortunately not an option. The checksum…
Benedikt Waldvogel
  • 12,406
  • 8
  • 49
  • 61
32
votes
5 answers

Error updating emacs packages: Failed to download 'gnu' archive

My init.el uses this to initialize packages: (package-initialize) (add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")) (add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/")) (add-to-list…
yayitswei
  • 4,587
  • 5
  • 27
  • 34
30
votes
7 answers

Determine whether .NET assemblies were built from the same source

Does anyone know of a way to compare two .NET assemblies to determine whether they were built from the "same" source files? I am aware that there are some differencing utilities available, such as the plugin for Reflector, but I am not interested in…
Clayton
  • 301
  • 3
  • 4
30
votes
3 answers

Canonical way to checksum downloads in a Dockerfile?

I'm creating a Dockerfile that downloads, builds, installs node.js from source. I'd like to checksum the download before building it, and stop or exit the Dockerfile if the checksum fails: # officially supported ubuntu FROM ubuntu:12.04 #…
bgibson
  • 17,379
  • 8
  • 29
  • 45
30
votes
2 answers

Rsync checksum only for same size files

There's a bunch of threads regarding rsync checksum, but none seems addressing this need, which would be the most effective and fastest way to sync, at least in my case: same time and same size ► skip file (no transfer, no checksum) different sizes…
Sylvain
  • 631
  • 1
  • 6
  • 6
30
votes
3 answers

UDP checksum calculation

The UDP header struct defined at /usr/include/netinet/udp.h is as follows struct udphdr { u_int16_t source; u_int16_t dest; u_int16_t len; u_int16_t check; }; What value is stored in the check field of the header? How to verify if the…
Deepak
  • 2,003
  • 6
  • 30
  • 32
29
votes
2 answers

How to get the SHA-1/MD5 checksum of a file with Qt?

Is there a way to get the MD5 or SHA-1 checksum/hash of a file on disk in Qt? For example, I have the file path and I might need to verify that the contents of that file matches a certain hash value.
user2282405
  • 873
  • 2
  • 9
  • 10
29
votes
17 answers

How do I validate a UPC or EAN code?

I need a C# .NET function to evaluate whether a typed or scanned barcode is a valid Global Trade Item Number (UPC or EAN). The last digit of a bar code number is a computer Check Digit which makes sure the bar code is correctly composed. GTIN Check…
Zack Peterson
  • 56,055
  • 78
  • 209
  • 280
28
votes
9 answers

How to generate a verification code/number?

I'm working on an application where users have to make a call and type a verification number with the keypad of their phone. I would like to be able to detect if the number they type is correct or not. The phone system does not have access to a list…
Costo
  • 5,940
  • 8
  • 33
  • 35
28
votes
3 answers

Calculate Hash or Checksum for a table in SQL Server

I'm trying to compute a checksum or a hash for an entire table in SQL Server 2008. The problem I'm running into is that the table contains an XML column datatype, which cannot be used by checksum and has to be converted to nvarchar first. So I need…
Gabe Brown
  • 1,418
  • 3
  • 17
  • 22
27
votes
5 answers

When generating a SHA256 / 512 hash, is there a minimum 'safe' amount of data to hash?

I have heard that when creating a hash, it's possible that if small files or amounts of data are used, the resulting hash is more likely to suffer from a collision. If that is true, is there a minimum "safe" amount of data that should be used to…
PeterM
  • 2,534
  • 6
  • 31
  • 38