Oihana PHP Arango

md5.php

Table of Contents

Functions

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

Functions

md5()

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

md5(string $value) : string

This helper wraps the ArangoDB AQL function MD5(text) which calculates the MD5 checksum for the given text and returns it as a hexadecimal string. MD5 is a widely used cryptographic hash function producing a 128-bit hash.

Example AQL usage:

MD5("hello")     // returns "5d41402abc4b2a76b9719d911017c592"
MD5("world")     // returns "7d865e959b2466918c9863afca942d0fb"
MD5(doc.content) // returns MD5 hash of content
Parameters
$value : string

String expression to calculate MD5 hash for.

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

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

For SHA1 hash.

sha256()

For SHA256 hash.

crc32()

For CRC32 checksum.

since
1.0.0
author

Marc Alcaraz

Return values
string

The formatted AQL expression.

On this page

Search results