Class: PlainBufferCrc8
- Inherits:
-
Object
- Object
- PlainBufferCrc8
- Defined in:
- lib/tablestore/plain_buffer_crc8.rb
Class Method Summary collapse
- .crc_int32(crc, byte) ⇒ Object
- .crc_int64(crc, byte) ⇒ Object
- .crc_int8(crc, byte) ⇒ Object
- .crc_string(crc, bytes) ⇒ Object
Class Method Details
.crc_int32(crc, byte) ⇒ Object
13 14 15 |
# File 'lib/tablestore/plain_buffer_crc8.rb', line 13 def crc_int32(crc, byte) Digest::CRC8Auto.new.crc8(crc, [byte].pack('i')).checksum end |
.crc_int64(crc, byte) ⇒ Object
17 18 19 |
# File 'lib/tablestore/plain_buffer_crc8.rb', line 17 def crc_int64(crc, byte) Digest::CRC8Auto.new.crc8(crc, [byte].pack('q')).checksum end |