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
0
votes
2 answers

Update UDP checksum in fragmented packets

I'm building a network appliance. I need to support NAT and IP packet fragmentation. When I change the source or destination address of a UDP packet, I have to correct the UDP checksum (and the IP checksum too, but that's trivial). When the packet…
Daniel Knueven
  • 222
  • 1
  • 11
0
votes
2 answers

CRC-15 giving wrong values

I am trying to create a CRC-15 check in c and the output is never correct for each line of the file. I am trying to output the CRC for each line cumulatively next to each line. I use: #define POLYNOMIAL 0xA053 for the divisor and text for the…
starlight
  • 130
  • 1
  • 18
0
votes
2 answers

How to calculate the Hexa value from the IP checksum field?

I have a unsigned short buffer , it contain a hexa values of IP header . unsigned short buffer = {45,00,00,4E,4E,05,00,10,80,11,0X00,0X00,0A,00,00,1C,1A,00,00,2F}; I added 0X00 , 0X00 in the place of Checksum filed and calculated checksum with the…
user2986042
  • 1,098
  • 2
  • 16
  • 37
0
votes
1 answer

Checksum calculates correctly one time, then doesn't after with CRC32 in Java

I'm having an issue with my checksum calculated with the CRC32 library in Java. So the client computes the checksum like so.... /** * Increments current packet message number, selects a * random destination, and sends the packet. * @param…
Carson
  • 1,147
  • 5
  • 19
  • 41
0
votes
1 answer

Can't get correct icmpv6 checksum

Need to write a tool where i need to construct the whole ICMPv6 packet. I can't seem to get the code to generate correct ICMPv6 checksum. I have tried the checksum(void * buffer, int bytes) function from the following Calculating checksum of ICMPv6…
quandrione
  • 61
  • 1
  • 4
0
votes
2 answers

calculate checksum hex in Python 3

I want to calculate checksum. The process I want to do like below; Step-1 a="10F8000041303131303030353000000000000000" Step-2 10+F8+00+00+41+30+31+31+30+30+30+35+30+00+00+00+00+00+00+00 = D0 Step-3 ~D0 = 2F -> 2F + 1 = 30 I tried that; def…
Purgoufr
  • 761
  • 14
  • 22
0
votes
3 answers

How do I create an FCS for PPP packets?

I am trying to create a software simulation on an Ubuntu GNU/Linux machine which will work like PPPoE. I would like this simulator to take outgoing packets, strip off the ethernet header, insert the PPP flags (7E, FF, 03, 00, and 21) and place the…
J Sin
  • 1
  • 1
  • 1
0
votes
0 answers

Create checksum for fields of a record

I have a database with several fields of various types (basically String, Integer and Decimal). I'd like to create a control field to store something like a checksum in order to detect simple value changes from any among those fields. I first…
VBobCat
  • 2,527
  • 4
  • 29
  • 56
0
votes
2 answers

Can someone please explain XOR (for checksum) in Python 3

I am working on an exercise for foo.bar and the basic idea is to take a list of integers and do some things to it to derive a specific subset of that list, then XOR (for a checksum) those values by means of this: result = 0^1^2^3^4^6 Which equals…
Gabriel_W
  • 1,645
  • 5
  • 16
  • 26
0
votes
0 answers

Oracle jdk checksums are wrong

I have been trying to download the latest JDK for windows, jdk-8u121-windows-x64.exe, at: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html The page links to a checksum page listing all of the MD5 and SHA-256…
Jorgo
  • 11
0
votes
1 answer

ChecksumException when reading from manually generated (hard coded) sequence file of Hadoop?

I wrote a code to save files into sequence file of Hadoop. The key is the file name and the value is the byte array of the file.The output was a sequence file and .crc file After that I tried to read from the sequence file,but I got an exception…
Mosab Shaheen
  • 1,114
  • 10
  • 25
0
votes
2 answers

Checkum algorithm that can combine 2 checksums into one

I am seeking for an algorithm, that knows how to combine 2 checksums. Specifically I want something like: Combine(CheckSum(FirstHalf(File)), CheckSum(SecondHalf(File))) = CheckSum(File) EDIT: it is important that the algorithm recognizes the…
Timofey
  • 2,478
  • 3
  • 37
  • 53
0
votes
1 answer

Best way to calculate UDP datagram checksum?

What is the best way to calculate a UDP datagram checksum? Out of Python's MD5, SHA256 or any other method, which method can surely help in identifying a corrupt packet? Also, my datagram is of the format: packet = struct.pack('HH', seq_num,…
Jarvis
  • 8,494
  • 3
  • 27
  • 58
0
votes
0 answers

C# how to add check a file sha1 to existing code

My code below should check the working directory for the existence of test.mdb and then if it exists it should check the sha1 of MyVbs against MySha and if they’re the same it should go on to process.Start. What code do I need to make this (if MyVbs…
p deman
  • 75
  • 3
  • 11
0
votes
2 answers

What could cause false change of sha1 checkmap?

I am boggled by the fact that the sha1 sum started to change without change in the java classes. I have reverted changes to the files, recompiled the project and I get a different checksum than the one that should be. The last change of the package…
1 2 3
99
100