类 AlgoParams

java.lang.Object
com.cdkjframework.util.encrypts.crc.AlgoParams

public class AlgoParams extends Object
  • 字段概要

    字段
    修饰符和类型
    字段
    说明
    long
    This is the official checksum value.
    int
    This is hash size.
    long
    This parameter specifies the initial value of the register when the algorithm starts.This is the value that is to be assigned to the register in the direct table algorithm.
    This is a name given to the algorithm.
    long
    This parameter is the poly.
    boolean
    This is a boolean parameter.
    boolean
    This is a boolean parameter.
    long
    This is an W-bit value that should be specified as a hexadecimal number.It is XORed to the final register value (after the REFOUT) stage before the value is returned as the official checksum.
  • 构造器概要

    构造器
    构造器
    说明
    AlgoParams(String name, int hashSize, long poly, long init, boolean refIn, boolean refOut, long xorOut, long check)
    构造函数
  • 方法概要

    从类继承的方法 java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 字段详细资料

    • check

      public long check
      This is the official checksum value.
    • hashSize

      public int hashSize
      This is hash size.
    • init

      public long init
      This parameter specifies the initial value of the register when the algorithm starts.This is the value that is to be assigned to the register in the direct table algorithm. In the table algorithm, we may think of the register always commencing with the value zero, and this value being XORed into the register after the N'th bit iteration. This parameter should be specified as a hexadecimal number.
    • name

      public String name
      This is a name given to the algorithm. A string value.
    • poly

      public long poly
      This parameter is the poly. This is a binary value that should be specified as a hexadecimal number.The top bit of the poly should be omitted.For example, if the poly is 10110, you should specify 06. An important aspect of this parameter is that it represents the unreflected poly; the bottom bit of this parameter is always the LSB of the divisor during the division regardless of whether the algorithm being modelled is reflected.
    • refIn

      public boolean refIn
      This is a boolean parameter. If it is FALSE, input bytes are processed with bit 7 being treated as the most significant bit (MSB) and bit 0 being treated as the least significant bit.If this parameter is FALSE, each byte is reflected before being processed.
    • refOut

      public boolean refOut
      This is a boolean parameter. If it is set to FALSE, the final value in the register is fed into the XOROUT stage directly, otherwise, if this parameter is TRUE, the final register value is reflected first.
    • xorOut

      public long xorOut
      This is an W-bit value that should be specified as a hexadecimal number.It is XORed to the final register value (after the REFOUT) stage before the value is returned as the official checksum.
  • 构造器详细资料

    • AlgoParams

      public AlgoParams(String name, int hashSize, long poly, long init, boolean refIn, boolean refOut, long xorOut, long check)
      构造函数
      参数:
      name - 名称
      hashSize - 输出字节数
      poly - 多项式
      init - 初始值
      refIn - 反转输入
      refOut - 反转输出
      xorOut - 结果异或
      check - 校验值