Class CRC64ECMA182

java.lang.Object
org.seppiko.commons.utils.crypto.crc.CRC64ECMA182
All Implemented Interfaces:
Checksum

public class CRC64ECMA182 extends Object implements Checksum
A class that can be used to compute the CRC64 of a data stream with ECMA182.
Author:
Leonard Woo
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Create CRC64 object and initialization.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Returns the current checksum value.
    void
    Resets the checksum to its initial value.
    void
    update(byte[] b, int off, int len)
    Updates the CRC64 checksum with the specified array of bytes.
    void
    update(int b)
    Updates the CRC64 checksum with the specified byte.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface java.util.zip.Checksum

    update, update
  • Constructor Details

    • CRC64ECMA182

      public CRC64ECMA182()
      Create CRC64 object and initialization.
  • Method Details

    • update

      public void update(int b)
      Updates the CRC64 checksum with the specified byte.
      Specified by:
      update in interface Checksum
      Parameters:
      b - number.
    • update

      public void update(byte[] b, int off, int len) throws NullPointerException, ArrayIndexOutOfBoundsException
      Updates the CRC64 checksum with the specified array of bytes.
      Specified by:
      update in interface Checksum
      Parameters:
      b - data byte array.
      off - data init offset.
      len - data length.
      Throws:
      NullPointerException - data is null.
      ArrayIndexOutOfBoundsException - if off is negative, or len is negative, or off+len is * negative or greater than the length of the array b.
    • getValue

      public long getValue()
      Returns the current checksum value.
      Specified by:
      getValue in interface Checksum
      Returns:
      the current checksum value.
    • reset

      public void reset()
      Resets the checksum to its initial value.
      Specified by:
      reset in interface Checksum