PHP - Manual: sodium_bin2hex
2024-12-22
(PHP 7 >= 7.2.0, PHP 8)
sodium_bin2hex — Encode to hexadecimal
$string
): stringConverts a raw binary string into a hex-encoded string. Unlike the standard hex-encoding function, sodium_bin2hex() is constant-time (a property that is important for any code that touches cryptographic inputs, such as plaintexts or keys).
string
Raw binary string.
Hex encoded string.
官方地址:https://www.php.net/manual/en/function.sodium-bin2hex.php