qChecksum()
-
Can anybody point me to an open source algorithm that is compatible with qChecksum()?
I found this page: https://srecord.sourceforge.net/crc16-ccitt.html, but can not get the results from it to agree with qChecksum().
-
Can anybody point me to an open source algorithm that is compatible with qChecksum()?
I found this page: https://srecord.sourceforge.net/crc16-ccitt.html, but can not get the results from it to agree with qChecksum().
@Warren_Mason Hi, welcome to the forum.
Well Qt is open source, so how about just the code of qChecksum itself? Source Code.
The function implements two open standards, as pointed to by the checksum type argument: ISO 3309 and ITU-V.41, so if you don't want to use the code from Qt itself for some reason you might want to look for documentation/implementation of any of those standards.
-
"compatible with" means you should use the same algorithm so it calculates the same. FWIW, checksums are primitive compared to CRC algorithms, but there is a tradeoff in computational complexity.
checksums generally accumulate input and XOR against the previous value, while CRC compare against the coefficients of a polynomial, so they have greater capacity to detect errors.
-
@Warren_Mason Hi, welcome to the forum.
Well Qt is open source, so how about just the code of qChecksum itself? Source Code.
The function implements two open standards, as pointed to by the checksum type argument: ISO 3309 and ITU-V.41, so if you don't want to use the code from Qt itself for some reason you might want to look for documentation/implementation of any of those standards.
@Chris-Kawa Thanks for the pointer to the code. I'm new to Qt and still finding my way around.
-