Enum NonCryptoAlgorithm
Specifies the different implementations of a non-cryptographic hashing algorithm.
public enum NonCryptoAlgorithm
Fields
Fnv1024 = 5The Fowler–Noll–Vo (FNV-1/FNV-1A) algorithm (1024 bits).
Fnv128 = 2The Fowler–Noll–Vo (FNV-1/FNV-1A) algorithm (128 bits).
Fnv256 = 3The Fowler–Noll–Vo (FNV-1/FNV-1A) algorithm (256 bits).
Fnv32 = 0The Fowler–Noll–Vo (FNV-1/FNV-1A) algorithm (32 bits).
Fnv512 = 4The Fowler–Noll–Vo (FNV-1/FNV-1A) algorithm (512 bits).
Fnv64 = 1The Fowler–Noll–Vo (FNV-1/FNV-1A) algorithm (64 bits).
Examples
The following example demonstrates how to use the NonCryptoAlgorithm enumeration to select a non-cryptographic hash algorithm.
using System;
using Cuemon.Security;
namespace MyApp.Examples;
public class NonCryptoAlgorithmExample
{
public static void Main()
{
NonCryptoAlgorithm[] algorithms =
{
NonCryptoAlgorithm.Fnv32,
NonCryptoAlgorithm.Fnv64,
NonCryptoAlgorithm.Fnv128,
NonCryptoAlgorithm.Fnv256,
NonCryptoAlgorithm.Fnv512,
NonCryptoAlgorithm.Fnv1024
};
foreach (var algo in algorithms)
{
Console.WriteLine("{0} (value: {1})", algo, (int)algo);
// Output:
// Fnv32 (value: 0)
// Fnv64 (value: 1)
// Fnv128 (value: 2)
// Fnv256 (value: 3)
// Fnv512 (value: 4)
// Fnv1024 (value: 5)
}}
}