class Digest::CRC32POSIX
Implements the CRC32
POSIX algorithm.
Constants
- INIT_CRC
- TABLE
Public Instance Methods
update(data)
click to toggle source
Updates the CRC32
POSIX checksum.
@param [String] data
The data to update the checksum with.
# File lib/digest/crc32_posix.rb, line 52 def update(data) data.each_byte do |b| @crc = (@table[((@crc >> 24) ^ b) & 0xff] ^ (@crc << 8)) & 0xffffffff end return self end