Crc32CalculateHash(String, Encoding, UInt32) Method

Computes the CRC-32 hash value for the specified String.

Definition

Namespace: KGySoft.Security.Cryptography
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
C#
public static uint CalculateHash(
	string s,
	Encoding? encoding = null,
	uint polynomial = 3988292384
)

Parameters

s  String
The input String to compute the hash code for.
encoding  Encoding  (Optional)
An Encoding instance to specify the desired byte representation of the specified string, or to use UTF8 encoding. This parameter is optional.
Default value: .
polynomial  UInt32  (Optional)
The polynomial to use to calculate the CRC value. This parameter is optional.
Default value: StandardPolynomial.

Return Value

UInt32
The CRC-32 hash value of the specified String.

See Also