org.fosstrak.hal.util
Class CRC16

java.lang.Object
  extended by org.fosstrak.hal.util.CRC16

public class CRC16
extends java.lang.Object

CRC16 calculates the CRC16 checksum with polynom 0x8408 and preset 0xFFFF.

Author:
Simon Keel, skeel@student.ethz.ch

Constructor Summary
CRC16()
           
 
Method Summary
static byte[] crc16(byte[] data)
          calculates the checksum.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CRC16

public CRC16()
Method Detail

crc16

public static byte[] crc16(byte[] data)
calculates the checksum.

Parameters:
data - the byte-array for which the checksum is to be calculated
Returns:
a byte-array of length 2 containing the checksum


Copyright © 2008. All Rights Reserved.