KGy SOFT

Crc32 Class

KGy SOFT Core Libraries Help
Implementation of the CRC-32 hash algorithm.
Inheritance Hierarchy

SystemObject
  System.Security.CryptographyHashAlgorithm
    KGySoft.Security.CryptographyCrc32

Namespace:  KGySoft.Security.Cryptography
Assembly:  KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 5.0.0-rc.1
Syntax

[CLSCompliantAttribute(false)]
public class Crc32 : HashAlgorithm

The Crc32 type exposes the following members.

Constructors

  NameDescription
Public methodCrc32
Initializes a new instance of the Crc32 class with default settings.
Public methodCrc32(UInt32, UInt32, Boolean)
Initializes a new instance of the Crc32 class.
Top
Properties

  NameDescription
Public propertyCanReuseTransform
Gets a value indicating whether the current transform can be reused.
(Inherited from HashAlgorithm.)
Public propertyCanTransformMultipleBlocks
When overridden in a derived class, gets a value indicating whether multiple blocks can be transformed.
(Inherited from HashAlgorithm.)
Public propertyHash
Gets the value of the computed hash code.
(Inherited from HashAlgorithm.)
Public propertyHashSize
Gets the size, in bits, of the computed hash code.
(Overrides HashAlgorithmHashSize.)
Public propertyInputBlockSize
When overridden in a derived class, gets the input block size.
(Inherited from HashAlgorithm.)
Public propertyOutputBlockSize
When overridden in a derived class, gets the output block size.
(Inherited from HashAlgorithm.)
Top
Methods

  NameDescription
Public methodStatic memberCalculateHash(Byte, UInt32, UInt32)
Computes the CRC-32 hash value for the specified byte array.
Public methodStatic memberCalculateHash(String, Encoding, UInt32)
Computes the CRC-32 hash value for the specified String.
Public methodStatic memberCalculateHash(Byte, Int32, Int32, UInt32, UInt32)
Computes the CRC-32 hash value for the specified byte array.
Public methodClear
Releases all resources used by the HashAlgorithm class.
(Inherited from HashAlgorithm.)
Public methodComputeHash(Stream)
Computes the hash value for the specified Stream object.
(Inherited from HashAlgorithm.)
Public methodComputeHash(Byte)
Computes the hash value for the specified byte array.
(Inherited from HashAlgorithm.)
Public methodComputeHash(Byte, Int32, Int32)
Computes the hash value for the specified region of the specified byte array.
(Inherited from HashAlgorithm.)
Public methodDispose
Releases all resources used by the current instance of the HashAlgorithm class.
(Inherited from HashAlgorithm.)
Protected methodDispose(Boolean)
Releases the unmanaged resources used by the HashAlgorithm and optionally releases the managed resources.
(Inherited from HashAlgorithm.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodHashCore
Computes the CRC-32 hash for the specified array.
(Overrides HashAlgorithmHashCore(Byte, Int32, Int32).)
Protected methodHashFinal
Gets the final result of the computed CRC-32 hash as a byte array.
(Overrides HashAlgorithmHashFinal.)
Public methodInitialize
Resets internal state of the algorithm. Used internally.
(Overrides HashAlgorithmInitialize.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodTransformBlock
Computes the hash value for the specified region of the input byte array and copies the specified region of the input byte array to the specified region of the output byte array.
(Inherited from HashAlgorithm.)
Public methodTransformFinalBlock
Computes the hash value for the specified region of the specified byte array.
(Inherited from HashAlgorithm.)
Top
Fields

  NameDescription
Public fieldStatic memberCastagnoliPolynomial
The Castagnoli polynomial for the Crc32 hash algorithm (also known as CRC-32C). This field is constant.
Protected fieldHashSizeValue
Represents the size, in bits, of the computed hash code.
(Inherited from HashAlgorithm.)
Protected fieldHashValue
Represents the value of the computed hash code.
(Inherited from HashAlgorithm.)
Public fieldStatic memberKoopmanPolynomial
The Koopman polynomial for the Crc32 hash algorithm (also known as CRC-32K). This field is constant.
Public fieldStatic memberStandardPolynomial
The standard polynomial for the Crc32 hash algorithm. This field is constant.
Protected fieldState
Represents the state of the hash computation.
(Inherited from HashAlgorithm.)
Top
Extension Methods

  NameDescription
Public Extension MethodConvert(Type, CultureInfo)Overloaded.
Converts an Object specified in the obj parameter to the desired targetType.
See the Examples section of the generic ConvertTTarget(Object, CultureInfo) overload for an example.
(Defined by ObjectExtensions.)
Public Extension MethodCode exampleConvertTTarget(CultureInfo)Overloaded.
Converts an Object specified in the obj parameter to the desired TTarget.
(Defined by ObjectExtensions.)
Public Extension MethodIn (Defined by ObjectExtensions.)
Public Extension MethodTryConvert(Type, Object)Overloaded.
Tries to convert an Object specified in the obj parameter to the desired targetType.
(Defined by ObjectExtensions.)
Public Extension MethodTryConvert(Type, CultureInfo, Object)Overloaded.
Tries to convert an Object specified in the obj parameter to the desired targetType.
(Defined by ObjectExtensions.)
Public Extension MethodTryConvertTTarget(TTarget)Overloaded.
Tries to convert an Object specified in the obj parameter to the desired TTarget.
See the Examples section of the ConvertTTarget(Object, CultureInfo) method for a related example.
(Defined by ObjectExtensions.)
Public Extension MethodTryConvertTTarget(CultureInfo, TTarget)Overloaded.
Tries to convert an Object specified in the obj parameter to the desired TTarget.
See the Examples section of the ConvertTTarget(Object, CultureInfo) method for a related example.
(Defined by ObjectExtensions.)
Top
See Also

Reference