python calculate signed crc32 integer to checksum


I have the following string I would like to calculate a checksum for.


I do it the following

string2 = string.encode('ascii')
checksum = zlib.crc32((string2))

This gives me an integer of 3467096777. However, the server provider says it should be -949017128. Additionally, I tried many variants of the string and always ended up with a positive number, which somehow leads me to the possibility that my way of calculating a signed crc32 integer is wrong.

I converted the -949017128 via the following

checksum_server = -949017128 & 0xffffffff

it yields 3345950168, which is still different from mine.

Is there a way to calculate the string out of the signed crc32 integer -949017128?

asked on Stack Overflow Jan 26, 2019 by freddy888 • edited Nov 8, 2019 by Jona

0 Answers

Nobody has answered this question yet.

User contributions licensed under CC BY-SA 3.0