Oihana PHP Arango

fnv64.php

Table of Contents

Functions

fnv64()  : string
Calculate the FNV-1A 64-bit hash for text and return it in hexadecimal format.

Functions

fnv64()

Calculate the FNV-1A 64-bit hash for text and return it in hexadecimal format.

fnv64(string $value) : string

This helper wraps the ArangoDB AQL function FNV64(text) which calculates the FNV-1A 64-bit hash for the given text and returns it as a hexadecimal string. FNV (Fowler-Noll-Vo) is a fast, non-cryptographic hash function.

Example AQL usage:

FNV64("hello")                // returns "a430d84680aabd0b"
FNV64("world")                // returns "a430d84680aabd0b"
FNV64(doc.content)            // returns FNV64 hash of content
Parameters
$value : string

String expression to calculate FNV64 hash for.

Tags
example
use function oihana\arango\db\functions\strings\fnv64;

$expr = fnv64('doc.content');
// Produces: 'FNV64(doc.content)'
see
https://docs.arangodb.com/stable/aql/functions/string/#fnv64
md5()

For MD5 hash.

sha1()

For SHA1 hash.

crc32()

For CRC32 checksum.

since
1.0.0
author

Marc Alcaraz

Return values
string

The formatted AQL expression.

On this page

Search results