C# Class Classless.Hasher.CRC

Computes the CRC hash for the input data using the managed library.
Inheritance: System.Security.Cryptography.HashAlgorithm
Show file Open project: codebutler/meshwork

Public Methods

Method Description
CRC ( CRCParameters param ) : System

Initializes a new instance of the CRC class.

Initialize ( ) : void

Initializes the algorithm.

Protected Methods

Method Description
HashCore ( byte array, int ibStart, int cbSize ) : void

Drives the hashing function.

HashFinal ( ) : byte[]

Performs any final activities required by the hash algorithm.

Private Methods

Method Description
BuildLookup ( CRCParameters param ) : void

Build the CRC lookup table for a given polynomial.

CRC ( ) : System
Reflect ( long data, int numBits ) : long

Reflects the lower bits of the value provided.

Method Details

CRC() public method

Initializes a new instance of the CRC class.
public CRC ( CRCParameters param ) : System
param CRCParameters The parameters to utilize in the CRC calculation.
return System

HashCore() protected method

Drives the hashing function.
protected HashCore ( byte array, int ibStart, int cbSize ) : void
array byte The array containing the data.
ibStart int The position in the array to begin reading from.
cbSize int How many bytes in the array to read.
return void

HashFinal() protected method

Performs any final activities required by the hash algorithm.
protected HashFinal ( ) : byte[]
return byte[]

Initialize() public method

Initializes the algorithm.
public Initialize ( ) : void
return void