WordPress at a glance
function is not described

ParagonIE_Sodium_Compat::bin2hex() public WP 1.0

Cache-timing-safe implementation of bin2hex().

{} It's a method of the class: ParagonIE_Sodium_Compat{}

No Hooks.


String. A hexadecimal-encoded string


$result = ParagonIE_Sodium_Compat::bin2hex( $string );
$string(string) (required)
A string (probably raw binary)

Code of ParagonIE_Sodium_Compat::bin2hex() WP 5.7

public static function bin2hex($string)
    /* Type checks: */
    ParagonIE_Sodium_Core_Util::declareScalarType($string, 'string', 1);

    if (self::useNewSodiumAPI()) {
        return (string) sodium_bin2hex($string);
    if (self::use_fallback('bin2hex')) {
        return (string) call_user_func('\\Sodium\\bin2hex', $string);
    return ParagonIE_Sodium_Core_Util::bin2hex($string);