C# Class DamienG.Security.Cryptography.Crc64

Implements a 64-bit CRC hash algorithm for a given polynomial.
For ISO 3309 compliant 64-bit CRC's use Crc64Iso.
Inheritance: System.Security.Cryptography.HashAlgorithm
Show file Open project: damieng/DamienGKit

Public Methods

Method Description
Crc64 ( System.UInt64 polynomial ) : System
Crc64 ( System.UInt64 polynomial, System.UInt64 seed ) : System
Initialize ( ) : void

Protected Methods

Method Description
CalculateHash ( System.UInt64 seed, System.UInt64 table, IList buffer, int start, int size ) : System.UInt64
CreateTable ( ulong polynomial ) : ulong[]
HashCore ( byte array, int ibStart, int cbSize ) : void
HashFinal ( ) : byte[]

Private Methods

Method Description
InitializeTable ( System.UInt64 polynomial ) : System.UInt64[]
UInt64ToBigEndianBytes ( System.UInt64 value ) : byte[]

Method Details

CalculateHash() protected static method

protected static CalculateHash ( System.UInt64 seed, System.UInt64 table, IList buffer, int start, int size ) : System.UInt64
seed System.UInt64
table System.UInt64
buffer IList
start int
size int
return System.UInt64

Crc64() public method

public Crc64 ( System.UInt64 polynomial ) : System
polynomial System.UInt64
return System

Crc64() public method

public Crc64 ( System.UInt64 polynomial, System.UInt64 seed ) : System
polynomial System.UInt64
seed System.UInt64
return System

CreateTable() protected static method

protected static CreateTable ( ulong polynomial ) : ulong[]
polynomial ulong
return ulong[]

HashCore() protected method

protected HashCore ( byte array, int ibStart, int cbSize ) : void
array byte
ibStart int
cbSize int
return void

HashFinal() protected method

protected HashFinal ( ) : byte[]
return byte[]

Initialize() public method

public Initialize ( ) : void
return void