Table of Contents

Fnv164 Class

Definition

Namespace
Bodu.IO.Hashing
Assembly
Bodu.IO.Hashing.dll
Package
Bodu.IO.Hashing 1.0.0
Source
Fnv.Fnv164.cs

Computes the hash for the input data using the FNV-1 64-bit hash algorithm. This class cannot be inherited.

public sealed class Fnv164 : Fnv, IResumableHashAlgorithm
Inheritance
Fnv164
Implements
Inherited Members
Extension Methods

Remarks

The FNV-1 variant performs multiplication before XOR. The 64-bit configuration uses prime 0x100000001B3 and offset basis 0xCBF29CE484222325.

Parameters at a glance.

  • Output size: 64 bits (8 bytes), big-endian.
  • Offset basis: 0xCBF29CE484222325.
  • FNV prime: 0x00000100000001B3.
  • Variant: FNV-1 (multiply, then XOR).

When to choose Fnv164. Pick Fnv164 only when reproducing a digest from existing FNV-1 64-bit consumers. For new code prefer Fnv1a64: same parameters, better avalanche, identical cost.

important

This algorithm is not cryptographically secure and should not be used for password hashing, digital signatures, or integrity validation in security-sensitive applications.

using Bodu.IO.Hashing;
using Bodu.IO.Hashing.Extensions;

var fnv = new Fnv164();
byte[] digest = fnv.ComputeHash(System.Text.Encoding.UTF8.GetBytes("key"));

Constructors

Fnv164()

Initializes a new instance of the Fnv164 class using standard FNV-1 64-bit parameters.

public Fnv164()

Applies to

ProductVersions
.NET8, 10