C# Class Classless.Hasher.CRCParameters

A class that contains the parameters necessary to initialize a CRC algorithm.
Inheritance: HashAlgorithmParameters
Show file Open project: codebutler/meshwork Class Usage Examples

Public Methods

Method Description
CRCParameters ( int order, long polynomial, long initial, long finalXOR, bool reflectIn ) : System

Initializes a new instance of the CRCParamters class.

GetHashCode ( ) : int

Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.

GetParameters ( CRCStandard standard ) : CRCParameters

Retrieves a standard set of CRC parameters.

Method Details

CRCParameters() public method

Initializes a new instance of the CRCParamters class.
public CRCParameters ( int order, long polynomial, long initial, long finalXOR, bool reflectIn ) : System
order int The order of the CRC (e.g., how many bits).
polynomial long The polynomial to use in the calculations.
initial long The initial value of the CRC.
finalXOR long The final value to XOR with the CRC.
reflectIn bool Whether or not to reflect the incoming data before calculating.
return System

GetHashCode() public method

Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
public GetHashCode ( ) : int
return int

GetParameters() public static method

Retrieves a standard set of CRC parameters.
public static GetParameters ( CRCStandard standard ) : CRCParameters
standard CRCStandard The name of the standard parameter set to retrieve.
return CRCParameters