类 AlgoParams
java.lang.Object
com.cdkjframework.util.encrypts.crc.AlgoParams
-
字段概要
字段修饰符和类型字段说明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) 构造函数 -
方法概要
-
字段详细资料
-
check
public long checkThis is the official checksum value. -
hashSize
public int hashSizeThis is hash size. -
init
public long initThis 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
This is a name given to the algorithm. A string value. -
poly
public long polyThis 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 refInThis 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 refOutThis 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 xorOutThis 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
- 校验值
-