PDA

View Full Version : crc32 check on qstring



chemstar
4th July 2006, 00:41
hello,

how can i simply create a check for a qstring value?

thx in advice!!!!

jpn
4th July 2006, 07:22
From QByteArray docs (http://doc.trolltech.com/4.1/qbytearray.html#qChecksum):


quint16 qChecksum ( const char * data, uint len )

Returns the CRC-16 checksum of the first len bytes of data.

The checksum is independent of the byte order (endianness).

Maybe this is sufficient for you?

There is also some crc32 implementation in Qt's 3rdparty sources src/3rdparty/zlib/crc32.*