File: crc16_usb.rb

package info (click to toggle)
ruby-digest-crc 0.7.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 912 kB
  • sloc: ansic: 2,136; ruby: 1,269; makefile: 4
file content (18 lines) | stat: -rw-r--r-- 271 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
require 'digest/crc16'

module Digest
  #
  # Implements the CRC16 USB algorithm.
  #
  class CRC16USB < CRC16

    INIT_CRC = 0xffff

    XOR_MASK = 0xffff

  end
end

if RUBY_ENGINE == 'ruby'
  begin; require 'digest/crc16_usb/crc16_usb_ext'; rescue LoadError; end
end