C# 클래스 DS4Windows.Crc32Algorithm

Implements a 32-bit CRC hash algorithm compatible with Zip etc.
Crc32 should only be used for backward compatibility with older file formats and algorithms. It is not secure enough for new applications. If you need to call multiple times for the same data either use the HashAlgorithm interface or remember that the result of one Compute call needs to be ~ (XOR) before being passed in as the seed for the next Compute call.
상속: HashAlgorithm
파일 보기 프로젝트 열기: Yohoki/DS4WindowsEx 1 사용 예제들

공개 메소드들

메소드 설명
CalculateBasicHash ( uint &seed, Array &buffer, int offset, int size ) : uint
CalculateFasterBT78Hash ( uint &seed, Array &buffer, int &start, int &size ) : uint

More optimized CRC-32 algorithm that only works with 78 byte arrays

Compute ( Array buffer ) : uint
Compute ( uint seed, Array buffer ) : uint
Compute ( uint polynomial, uint seed, Array buffer ) : uint
Crc32Algorithm ( ) : System
Crc32Algorithm ( uint polynomial, uint seed ) : System
Initialize ( ) : void
InitializeTable ( uint polynomial ) : uint[]

보호된 메소드들

메소드 설명
HashCore ( Array buffer, int start, int length ) : void
HashFinal ( ) : byte[]

비공개 메소드들

메소드 설명
CalculateHash ( Array table, uint seed, Array buffer, int start, int size ) : uint
UintToBigEndianBytes ( uint uint32 ) : byte[]

메소드 상세

CalculateBasicHash() 공개 정적인 메소드

public static CalculateBasicHash ( uint &seed, Array &buffer, int offset, int size ) : uint
seed uint
buffer Array
offset int
size int
리턴 uint

CalculateFasterBT78Hash() 공개 정적인 메소드

More optimized CRC-32 algorithm that only works with 78 byte arrays
public static CalculateFasterBT78Hash ( uint &seed, Array &buffer, int &start, int &size ) : uint
seed uint
buffer Array
start int
size int
리턴 uint

Compute() 공개 정적인 메소드

public static Compute ( Array buffer ) : uint
buffer Array
리턴 uint

Compute() 공개 정적인 메소드

public static Compute ( uint seed, Array buffer ) : uint
seed uint
buffer Array
리턴 uint

Compute() 공개 정적인 메소드

public static Compute ( uint polynomial, uint seed, Array buffer ) : uint
polynomial uint
seed uint
buffer Array
리턴 uint

Crc32Algorithm() 공개 메소드

public Crc32Algorithm ( ) : System
리턴 System

Crc32Algorithm() 공개 메소드

public Crc32Algorithm ( uint polynomial, uint seed ) : System
polynomial uint
seed uint
리턴 System

HashCore() 보호된 메소드

protected HashCore ( Array buffer, int start, int length ) : void
buffer Array
start int
length int
리턴 void

HashFinal() 보호된 메소드

protected HashFinal ( ) : byte[]
리턴 byte[]

Initialize() 공개 메소드

public Initialize ( ) : void
리턴 void

InitializeTable() 공개 정적인 메소드

public static InitializeTable ( uint polynomial ) : uint[]
polynomial uint
리턴 uint[]