hexEncode.php
Table of Contents
Functions
- hexEncode() : string
- Encodes binary data into a lowercase hexadecimal string.
Functions
hexEncode()
Encodes binary data into a lowercase hexadecimal string.
hexEncode(string $binary) : string
Thin wrapper around bin2hex() provided for API symmetry with the other helpers of this package (hexDecode(), base64UrlEncode()).
The function is binary-safe and always produces lowercase output, which matches the convention used for hashes, tokens and HMAC tags across the Oihana ecosystem.
Parameters
- $binary : string
-
Raw bytes to encode. May be empty.
Tags
Return values
string —A string of [0-9a-f] characters, twice as long as $binary.