Closed angristan closed 6 years ago
I want to create a token elsewhere with another length than 65.
bin2hex(random_bytes($int)) returns a string of length $int * 2 + 1, e.g.:
bin2hex(random_bytes($int))
$int * 2 + 1
return bin2hex(random_bytes(32)); // returns a string of length (32 * 2) + 1 = 65
With this PR:
return bin2hex(random_bytes(32)); // returns a string of length (((32 * 2) / 2) + 1) -1 = 32
I want to create a token elsewhere with another length than 65.
bin2hex(random_bytes($int))
returns a string of length$int * 2 + 1
, e.g.:With this PR: