Метод | Описание | |
---|---|---|
Hash ( IList |
Hash an array of 32 bit values.
|
|
Hash ( IList |
Hash an array of bytes.
|
|
Hash ( |
Hash a value.
|
|
Hash ( System.Int64 valueToHash, int numberOfBitsToReturn = MaximumNumberOfResultBitsGuaranteedToBeUnbiased ) : ulong |
Hash a value.
|
|
Hash ( |
Hash a value.
|
|
Hash ( string stringToHash, int numberOfBitsToReturn = MaximumNumberOfResultBitsGuaranteedToBeUnbiased ) : ulong |
Hash a string.
|
|
Hash ( ulong valueToHash, int numberOfBitsToReturn = MaximumNumberOfResultBitsGuaranteedToBeUnbiased ) : ulong |
Hash a value.
|
|
UniversalHashFunction ( byte keyOf16Or24Or32Bytes, int randomKeyVectorLengthInBytes = 256 ) : System |
Construct a keyed universal hash function. An instance of a universal hash function needs to store on the order of RandomKeyVectorLengthInBytes values upon construction, so it is best not to initialize this function for large strings (e.g., those over 32k).
|
|
UniversalHashFunction ( int randomKeyVectorLengthInBytes ) : System |
Construct a random universal hash function
|
|
UniversalHashFunction ( string key, int randomKeyVectorLengthInBytes = 256 ) : System |
Метод | Описание | |
---|---|---|
HashArrayThatExceedsLengthOfRandomKeyVector ( IList |
When asked to hash a value that exceeds the length of the key vector, we break the message into blocks no larger than the hash of the key vector, hash each block, and then recursively hash the array containing the hash of each block. (If the message is so long that the array of block hashes exceeds the length of the key vector, we'll do so again yet again.)
|
|
HashArrayThatExceedsLengthOfRandomKeyVector ( IList |
||
SetVectorLength ( int randomKeyVectorLengthInBytes ) : void | ||
SetVectorLengthAndGetNumberOfRandomBytesNeeded ( int randomKeyVectorLengthInBytes ) : int |
public Hash ( IList |
||
messageToBeHashed | IList |
An array of 32 bit unsigned values. |
numberOfBitsToReturn | int | The number of hash bits to return. /// Use a value ≤ 32 to ensure the result meets the requirements of a unviversal hash. /// If you choose a value between 33 and 64, only the high-order 32 bits are guaranteed to be unbiased. |
Результат | ulong |
public Hash ( IList |
||
messageToBeHashed | IList |
An array of bytes. |
numberOfBitsToReturn | int | The number of hash bits to return. /// Use a value ≤ 32 to ensure the result meets the requirements of a unviversal hash. /// If you choose a value between 33 and 64, only the high-order 32 bits are guaranteed to be unbiased. |
Результат | ulong |
public Hash ( |
||
valueToHash | The value to be hashed. | |
numberOfBitsToReturn | int | The number of hash bits to return. /// Use a value ≤ 32 to ensure the result meets the requirements of a unviversal hash. /// If you choose a value between 33 and 64, only the high-order 32 bits are guaranteed to be unbiased. |
Результат | ulong |
public Hash ( System.Int64 valueToHash, int numberOfBitsToReturn = MaximumNumberOfResultBitsGuaranteedToBeUnbiased ) : ulong | ||
valueToHash | System.Int64 | The value to be hashed. |
numberOfBitsToReturn | int | The number of hash bits to return. /// Use a value ≤ 32 to ensure the result meets the requirements of a unviversal hash. /// If you choose a value between 33 and 64, only the high-order 32 bits are guaranteed to be unbiased. |
Результат | ulong |
public Hash ( |
||
valueToHash | The value to be hashed. | |
numberOfBitsToReturn | int | The number of hash bits to return. /// Use a value ≤ 32 to ensure the result meets the requirements of a unviversal hash. /// If you choose a value between 33 and 64, only the high-order 32 bits are guaranteed to be unbiased. |
Результат | ulong |
public Hash ( string stringToHash, int numberOfBitsToReturn = MaximumNumberOfResultBitsGuaranteedToBeUnbiased ) : ulong | ||
stringToHash | string | A string to hash, which will be converted to a UTF8 byte array for hashing. |
numberOfBitsToReturn | int | The number of hash bits to return. /// Use a value ≤ 32 to ensure the result meets the requirements of a unviversal hash. /// If you choose a value between 33 and 64, only the high-order 32 bits are guaranteed to be unbiased. |
Результат | ulong |
public Hash ( ulong valueToHash, int numberOfBitsToReturn = MaximumNumberOfResultBitsGuaranteedToBeUnbiased ) : ulong | ||
valueToHash | ulong | The value to be hashed. |
numberOfBitsToReturn | int | The number of hash bits to return. /// Use a value ≤ 32 to ensure the result meets the requirements of a unviversal hash. /// If you choose a value between 33 and 64, only the high-order 32 bits are guaranteed to be unbiased. |
Результат | ulong |
public UniversalHashFunction ( byte keyOf16Or24Or32Bytes, int randomKeyVectorLengthInBytes = 256 ) : System | ||
keyOf16Or24Or32Bytes | byte | A key that should not be known to those who might try to create collisions, provided as an array of 16, 24, or 32 bytes. |
randomKeyVectorLengthInBytes | int | The length of the random key vector used for hashing. Should be twice the length of the longest value you expect to hash, /// unless you hash values bigger than you would want to keep in memory. If hashing a value longer than this, the universal hash properties may not hold. |
Результат | System |
public UniversalHashFunction ( int randomKeyVectorLengthInBytes ) : System | ||
randomKeyVectorLengthInBytes | int | The length of the random key vector used for hashing. Should be twice the length of the longest value you expect to hash, /// unless you hash values bigger than you would want to keep in memory. If hashing a value longer than this, the universal hash properties may not hold. |
Результат | System |
public UniversalHashFunction ( string key, int randomKeyVectorLengthInBytes = 256 ) : System | ||
key | string | A key that should not be known to those who might try to create collisions, provided as a string. |
randomKeyVectorLengthInBytes | int | The number of random bytes to generate, which should be equal /// to half the maximum allowable length, in bytes, of any value to be hashed. |
Результат | System |