Oihana PHP Arango

crc32.php

Table of Contents

Functions

crc32()  : string
Calculate the CRC32 checksum for text and return it in hexadecimal format.

Functions

crc32()

Calculate the CRC32 checksum for text and return it in hexadecimal format.

crc32(string $value) : string

This helper wraps the ArangoDB AQL function CRC32(text) which calculates the CRC32 checksum for the given text and returns it as a hexadecimal string. The polynomial used is 0x1EDC6F41 with initial value 0xFFFFFFFF and final XOR 0xFFFFFFFF.

Example AQL usage:

CRC32("hello")                // returns "3610a686"
CRC32("world")                // returns "4a17b156"
CRC32(doc.content)            // returns CRC32 checksum of content
Parameters
$value : string

String expression to calculate CRC32 checksum for.

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

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

For MD5 hash.

sha1()

For SHA1 hash.

since
1.0.0
author

Marc Alcaraz

Return values
string

The formatted AQL expression.

On this page

Search results