Crc32CalculateHash(Byte, Int32, Int32, UInt32, UInt32) Method
Computes the CRC-32 hash value for the specified byte array.
Namespace: KGySoft.Security.CryptographyAssembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 8.1.0
public static uint CalculateHash(
byte[] buffer,
int offset,
int count,
uint initialCrc = 0,
uint polynomial = 3988292384
)
Public Shared Function CalculateHash (
buffer As Byte(),
offset As Integer,
count As Integer,
Optional initialCrc As UInteger = 0,
Optional polynomial As UInteger = 3988292384
) As UInteger
public:
static unsigned int CalculateHash(
array<unsigned char>^ buffer,
int offset,
int count,
unsigned int initialCrc = 0,
unsigned int polynomial = 3988292384
)
static member CalculateHash :
buffer : byte[] *
offset : int *
count : int *
?initialCrc : uint32 *
?polynomial : uint32
(* Defaults:
let _initialCrc = defaultArg initialCrc 0
let _polynomial = defaultArg polynomial 3988292384
*)
-> uint32
- buffer Byte
- The input to compute the hash code for.
- offset Int32
- The offset into the byte array from which to begin using data.
- count Int32
- The number of bytes in the array to use as data.
- initialCrc UInt32 (Optional)
- The initial CRC value to use. If the final CRC is calculated in more sessions the result of the last calculation can be specified here. This parameter is optional.
Default value: 0. - polynomial UInt32 (Optional)
- The polynomial to use to calculate the CRC value. This parameter is optional.
Default value: StandardPolynomial.
UInt32The CRC-32 hash value of the specified
buffer; or, if
initialCrc was specified, an
accumulated hash value appended by the current
buffer.