Class CyclicRedundancyCheck
Represents the abstract class from which all implementations of the CRC hash algorithm inherit.
Inheritance
Implements
Inherited Members
Namespace: Cuemon.Security.Cryptography
Assembly: Cuemon.Security.dll
Syntax
public abstract class CyclicRedundancyCheck : HashAlgorithm, IDisposable
Constructors
| Improve this DocCyclicRedundancyCheck()
Initializes a new instance of the CyclicRedundancyCheck class.
Declaration
protected CyclicRedundancyCheck()
CyclicRedundancyCheck(PolynomialRepresentation)
Initializes a new instance of the CyclicRedundancyCheck class.
Declaration
protected CyclicRedundancyCheck(PolynomialRepresentation representation)
Parameters
Type | Name | Description |
---|---|---|
PolynomialRepresentation | representation | The CRC generator polynomial representation. |
Properties
| Improve this DocDefaultSeed
Gets the CRC default seed value.
Declaration
public abstract long DefaultSeed { get; }
Property Value
Type | Description |
---|---|
System.Int64 | The CRC default seed value. |
HashCoreResult
Gets or sets the resolved hash result.
Declaration
protected long HashCoreResult { get; set; }
Property Value
Type | Description |
---|---|
System.Int64 | The resolved hash result. |
LookupTable
Gets the lookup table for the associated CRC implementation.
Declaration
protected IList<long> LookupTable { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IList<System.Int64> | The lookup table for the associated CRC implementation. |
Polynomial
Gets the CRC polynomial hexadecimal value equal to CRC implementation and Representation.
Declaration
public long Polynomial { get; protected set; }
Property Value
Type | Description |
---|---|
System.Int64 | The CRC polynomial hexadecimal value equal to CRC implementation and Representation. |
Representation
Gets the CRC polynomial generator representation.
Declaration
public PolynomialRepresentation Representation { get; }
Property Value
Type | Description |
---|---|
PolynomialRepresentation | The CRC polynomial generator representation. |
Methods
| Improve this DocInitialize()
Initializes an implementation of the System.Security.Cryptography.HashAlgorithm class.
Declaration
public override sealed void Initialize()
Overrides
InitializePolynomial()
Initializes the implementation of the polynomial representation details.
Declaration
protected abstract void InitializePolynomial()
InitializePolynomialLookupTable(Byte, UInt16)
Initializes the implementation details of a CyclicRedundancyCheck related polynomial lookup table.
Declaration
protected abstract void InitializePolynomialLookupTable(byte currentBit, ushort currentTableIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | currentBit | The current bit ranging from 0 to 7. |
System.UInt16 | currentTableIndex | The current index of the associated polynomial LookupTable ranging from 0 to 255. |
Remarks
This method is - on first run - invoked 8 times per entry in the associated polynomial LookupTable, given a total of 2048 times.