RosettaCodeData/Task/CRC-32/Python/crc-32-1.py

9 lines
185 B
Python
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
>>> s = 'The quick brown fox jumps over the lazy dog'
>>> import zlib
2026-02-01 16:33:20 -08:00
>>> hex(zlib.crc32(s.encode()))
2023-07-01 11:58:00 -04:00
'0x414fa339'
>>> import binascii
2026-02-01 16:33:20 -08:00
>>> hex(binascii.crc32(s.encode()))
2023-07-01 11:58:00 -04:00
'0x414fa339'