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