sodium_bin2hex

(PHP 7 >= 7.2.0, PHP 8)

sodium_bin2hexEncode to hexadecimal

Descrizione

sodium_bin2hex(string $string): string

Converts 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).

Elenco dei parametri

string

Raw binary string.

Valori restituiti

Hex encoded string.

add a note add a note

User Contributed Notes 1 note

up
0
admin at manomite dot net
6 years ago
<?php

$string
= "my-password";

echo
sodium_bin2hex ( $string );

?>
To Top