Class CyclicRedundancyCheck32
Computes the CRC32 hash value for the input data using the implementation provided by the cyclic redundancy check class (CRC). This class cannot be inherited.
Inheritance
Implements
Inherited Members
Namespace: Cuemon.Security.Cryptography
Assembly: Cuemon.Security.dll
Syntax
public sealed class CyclicRedundancyCheck32 : CyclicRedundancyCheck, IDisposable
Constructors
| Improve this DocCyclicRedundancyCheck32()
Initializes a new instance of the CyclicRedundancyCheck32 class.
Declaration
public CyclicRedundancyCheck32()
CyclicRedundancyCheck32(PolynomialRepresentation)
Initializes a new instance of the CyclicRedundancyCheck class.
Declaration
public CyclicRedundancyCheck32(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 override long DefaultSeed { get; }
Property Value
Type | Description |
---|---|
System.Int64 | The CRC default seed value. |
Overrides
| Improve this DocHashSize
Gets the size, in bits, of the computed hash code.
Declaration
public override int HashSize { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The size of the hash. |
Overrides
Methods
| Improve this DocHashCore(Byte[], Int32, Int32)
When overridden in a derived class, routes data written to the object into the hash algorithm for computing the hash.
Declaration
protected override void HashCore(byte[] array, int ibStart, int cbSize)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | array | The input to compute the hash code for. |
System.Int32 | ibStart | The offset into the byte array from which to begin using data. |
System.Int32 | cbSize | The number of bytes in the byte array to use as data. |
Overrides
HashFinal()
When overridden in a derived class, finalizes the hash computation after the last data is processed by the cryptographic stream object.
Declaration
protected override byte[] HashFinal()
Returns
Type | Description |
---|---|
System.Byte[] | The computed hash code. |
Overrides
InitializePolynomial()
Initializes the implementation of the polynomial representation details.
Declaration
protected override void InitializePolynomial()
Overrides
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | The Representation property has an invalid value. |
InitializePolynomialLookupTable(Byte, UInt16)
Initializes the implementation details of a CyclicRedundancyCheck related polynomial lookup table.
Declaration
protected override 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. |
Overrides
Remarks
This method is - on first run - invoked 8 times per entry in the associated polynomial LookupTable, given a total of 2048 times.