Method: Digest::CRC32#update
- Defined in:
- lib/digest/crc32.rb
#update(data) ⇒ Object
Updates the CRC32 checksum.
109 110 111 112 113 114 115 |
# File 'lib/digest/crc32.rb', line 109 def update(data) data.each_byte do |b| @crc = @table[(@crc ^ b) & 0xff] ^ ((@crc >> 8) & 0xffffffff) end return self end |