Questions tagged [fnv]

Fowler–Noll–Vo is a non-cryptographic hash function created by Glenn Fowler, Landon Curt Noll, and Phong Vo.

From Wikipedia page on Fowler–Noll–Vo hash function

The current versions are FNV-1 and FNV-1a, which supply a means of creating non-zero FNV offset basis. FNV currently comes in 32-, 64-, 128-, 256-, 512-, and 1024-bit flavors. For pure FNV implementations, this is determined solely by the availability of FNV primes for the desired bit length; however, the FNV webpage discusses methods of adapting one of the above versions to a smaller length that may or may not be a power of two.

21 questions
0
votes
1 answer

How to resolve compilation error while borrowing values in Rust

I am new to Rust and here is my code to iterate through two FnvHashMaps and find the difference impl SaveChanges for Employee{ type Item = Employee; type List = FnvHashMap<(i32, i32), Employee>; type Id = (i32, i32); fn…
Ann
  • 31
  • 1
  • 6
0
votes
2 answers

How to compile and run FNV Hash

I am looking into open source hash functions to observe how the source code and hashing algorithm handles hash collisions. I am currently interested in low bit hash function and I found out about FNV through this other post However, does anyone know…
humblebeast
  • 303
  • 3
  • 16
-1
votes
1 answer

decode fnv128 hash in golang

I have some values stored as 128-bit FNV-1a hashes that I would like to "decode". From my understanding, although most hashes are one way, FNV is not a cryptographic hash. Is it possible to "decode" an FNV hash I created myself? I am using golang,…
Darwin
  • 13
  • 2
-1
votes
1 answer

FNV hash produces different result in 64 bit OS

I use FNV to hash a file in my 32 bit OS. Why the hash result of same code is different if I use the code in 64 bit OS? Here's my code: function gethash(const dwOffset: PByteArray; const dwLen: DWORD; const offset_basis: DWORD): DWORD; var i:…
alycia
  • 59
  • 1
  • 8
-2
votes
2 answers

Can anyone please check if I am doing this hashing correctly

I am trying to do an implementation of Fowler–Noll–Vo hash function The Pseudocode looks like this hash = FNV_offset_basis for each byte_of_data to be hashed hash = hash × FNV_prime hash = hash XOR byte_of_data return…
James Franco
  • 4,516
  • 10
  • 38
  • 80
-3
votes
2 answers

How would you interpret the behaviour of my C Hash function (type of Fowler–Noll–Vo_hash_function)?

I dont understand why the interger Value "hash" is getting lower in/after the 3 loop. I would guess this happen because the uint limitation is 2,147,483,647. BUT... when i try to go step by step the value is equal to 2146134658?. I´m not that good…
1
2