class Digest::CRC16Kermit

Implements Kermit’s CRC16 function.

@since 0.5.0

Constants

TABLE

Generated by ‘./pycrc.py –algorithm=table-driven –model=kermit –generate=c`

Public Instance Methods

update(data) click to toggle source

Updates the CRC16 Kermit checksum.

@param [String] data

The data to update the checksum with.
# File lib/digest/crc16_kermit.rb, line 53
def update(data)
  data.each_byte do |b|
    @crc = (@table[(@crc ^ b) & 0xff] ^ (@crc >> 8)) & 0xffff
  end

  return self
end