Table of Contents

Class HashFactory

Namespace
Cuemon.Security
Assembly
Cuemon.Core.dll

Provides access to factory methods for creating and configuring Hash instances.

public static class HashFactory
Inheritance
Object
HashFactory

Methods

CreateCrc(CyclicRedundancyCheckAlgorithm)

Creates an instance of a cyclic redundancy check implementation that derives from CyclicRedundancyCheck with the specified algorithm. Default is CyclicRedundancyCheck32 using Crc32.

public static Hash CreateCrc(CyclicRedundancyCheckAlgorithm algorithm = CyclicRedundancyCheckAlgorithm.Crc32)

Parameters

algorithm CyclicRedundancyCheckAlgorithm

The CyclicRedundancyCheckAlgorithm that defines the cyclic redundancy check implementation. Default is Crc32.

Returns

Hash

A Hash implementation of the by parameter specified algorithm.

CreateCrc32()

Creates an instance of CyclicRedundancyCheck32 using Crc32.

public static Hash CreateCrc32()

Returns

Hash

A Hash implementation of CyclicRedundancyCheck32.

CreateCrc32(UInt32, UInt32, UInt32, Action<CyclicRedundancyCheckOptions>)

Creates an instance of CyclicRedundancyCheck32 from the specified arguments.

public static Hash CreateCrc32(uint polynomial, uint initialValue, uint finalXor, Action<CyclicRedundancyCheckOptions> setup = null)

Parameters

polynomial UInt32

This is a binary value that should be specified as a hexadecimal number.

initialValue UInt32

This parameter specifies the initial value of the register when the algorithm starts.

finalXor UInt32

This is an W-bit value that should be specified as a hexadecimal number.

setup Action<CyclicRedundancyCheckOptions>

The CyclicRedundancyCheckOptions which may be configured.

Returns

Hash

A Hash implementation of CyclicRedundancyCheck32.

CreateCrc32Autosar()

Creates an instance of CyclicRedundancyCheck32 using Crc32Autosar.

public static Hash CreateCrc32Autosar()

Returns

Hash

A Hash implementation of CyclicRedundancyCheck32.

CreateCrc32Bzip2()

Creates an instance of CyclicRedundancyCheck32 using Crc32Bzip2.

public static Hash CreateCrc32Bzip2()

Returns

Hash

A Hash implementation of CyclicRedundancyCheck32.

CreateCrc32C()

Creates an instance of CyclicRedundancyCheck32 using Crc32C.

public static Hash CreateCrc32C()

Returns

Hash

A Hash implementation of CyclicRedundancyCheck32.

CreateCrc32CdRomEdc()

Creates an instance of CyclicRedundancyCheck32 using Crc32CdRomEdc.

public static Hash CreateCrc32CdRomEdc()

Returns

Hash

A Hash implementation of CyclicRedundancyCheck32.

CreateCrc32D()

Creates an instance of CyclicRedundancyCheck32 using Crc32D.

public static Hash CreateCrc32D()

Returns

Hash

A Hash implementation of CyclicRedundancyCheck32.

CreateCrc32Jamcrc()

Creates an instance of CyclicRedundancyCheck32 using Crc32Jamcrc.

public static Hash CreateCrc32Jamcrc()

Returns

Hash

A Hash implementation of CyclicRedundancyCheck32.

CreateCrc32Mpeg2()

Creates an instance of CyclicRedundancyCheck32 using Crc32Mpeg2.

public static Hash CreateCrc32Mpeg2()

Returns

Hash

A Hash implementation of CyclicRedundancyCheck32.

CreateCrc32Posix()

Creates an instance of CyclicRedundancyCheck32 using Crc32Posix.

public static Hash CreateCrc32Posix()

Returns

Hash

A Hash implementation of CyclicRedundancyCheck32.

CreateCrc32Q()

Creates an instance of CyclicRedundancyCheck32 using Crc32Q.

public static Hash CreateCrc32Q()

Returns

Hash

A Hash implementation of CyclicRedundancyCheck32.

CreateCrc32Xfer()

Creates an instance of CyclicRedundancyCheck32 using Crc32Xfer.

public static Hash CreateCrc32Xfer()

Returns

Hash

A Hash implementation of CyclicRedundancyCheck32.

CreateCrc64()

Creates an instance of CyclicRedundancyCheck64 using Crc64.

public static Hash CreateCrc64()

Returns

Hash

A Hash implementation of CyclicRedundancyCheck64.

CreateCrc64(UInt64, UInt64, UInt64, Action<CyclicRedundancyCheckOptions>)

Creates an instance of CyclicRedundancyCheck64 from the specified arguments.

public static Hash CreateCrc64(ulong polynomial, ulong initialValue, ulong finalXor, Action<CyclicRedundancyCheckOptions> setup = null)

Parameters

polynomial UInt64

This is a binary value that should be specified as a hexadecimal number.

initialValue UInt64

This parameter specifies the initial value of the register when the algorithm starts.

finalXor UInt64

This is an W-bit value that should be specified as a hexadecimal number.

setup Action<CyclicRedundancyCheckOptions>

The CyclicRedundancyCheckOptions which may be configured.

Returns

Hash

A Hash implementation of CyclicRedundancyCheck64.

CreateCrc64GoIso()

Creates an instance of CyclicRedundancyCheck64 using Crc64GoIso.

public static Hash CreateCrc64GoIso()

Returns

Hash

A Hash implementation of CyclicRedundancyCheck64.

CreateCrc64We()

Creates an instance of CyclicRedundancyCheck64 using Crc64We.

public static Hash CreateCrc64We()

Returns

Hash

A Hash implementation of CyclicRedundancyCheck64.

CreateCrc64Xz()

Creates an instance of CyclicRedundancyCheck64 using Crc64Xz.

public static Hash CreateCrc64Xz()

Returns

Hash

A Hash implementation of CyclicRedundancyCheck64.

CreateFnv(NonCryptoAlgorithm, Action<FowlerNollVoOptions>)

Creates an instance of a non-cryptographic implementation that derives from FowlerNollVoHash with the specified algorithm. Default is FowlerNollVo32 using Fnv1a.

public static Hash CreateFnv(NonCryptoAlgorithm algorithm = NonCryptoAlgorithm.Fnv32, Action<FowlerNollVoOptions> setup = null)

Parameters

algorithm NonCryptoAlgorithm

The NonCryptoAlgorithm that defines the non-cryptographic implementation. Default is Fnv32.

setup Action<FowlerNollVoOptions>

The FowlerNollVoOptions which may be configured.

Returns

Hash

A Hash implementation of the by parameter specified algorithm.

CreateFnv1024(Action<FowlerNollVoOptions>)

Creates an instance of FowlerNollVo1024.

public static Hash CreateFnv1024(Action<FowlerNollVoOptions> setup = null)

Parameters

setup Action<FowlerNollVoOptions>

The ConvertibleOptions which may be configured.

Returns

Hash

A Hash implementation of FowlerNollVo1024.

CreateFnv128(Action<FowlerNollVoOptions>)

Creates an instance of FowlerNollVo128.

public static Hash CreateFnv128(Action<FowlerNollVoOptions> setup = null)

Parameters

setup Action<FowlerNollVoOptions>

The ConvertibleOptions which may be configured.

Returns

Hash

A Hash implementation of FowlerNollVo128.

CreateFnv256(Action<FowlerNollVoOptions>)

Creates an instance of FowlerNollVo256.

public static Hash CreateFnv256(Action<FowlerNollVoOptions> setup = null)

Parameters

setup Action<FowlerNollVoOptions>

The ConvertibleOptions which may be configured.

Returns

Hash

A Hash implementation of FowlerNollVo256.

CreateFnv32(Action<FowlerNollVoOptions>)

Creates an instance of FowlerNollVo32.

public static Hash CreateFnv32(Action<FowlerNollVoOptions> setup = null)

Parameters

setup Action<FowlerNollVoOptions>

The ConvertibleOptions which may be configured.

Returns

Hash

A Hash implementation of FowlerNollVo32.

CreateFnv512(Action<FowlerNollVoOptions>)

Creates an instance of FowlerNollVo512.

public static Hash CreateFnv512(Action<FowlerNollVoOptions> setup = null)

Parameters

setup Action<FowlerNollVoOptions>

The ConvertibleOptions which may be configured.

Returns

Hash

A Hash implementation of FowlerNollVo512.

CreateFnv64(Action<FowlerNollVoOptions>)

Creates an instance of FowlerNollVo64.

public static Hash CreateFnv64(Action<FowlerNollVoOptions> setup = null)

Parameters

setup Action<FowlerNollVoOptions>

The ConvertibleOptions which may be configured.

Returns

Hash

A Hash implementation of FowlerNollVo64.