$ docker run --rm --name validator-libsodium-usage-php83-r16-bin2hex-hex2bin-roundtrip-2732 -t --mount type=bind,src=/tmp/validator-status-libsodium-usage-php83-r16-bin2hex-hex2bin-roundtrip,dst=/validator/status validator-libsodium-shared bash -lc 'set -euo pipefail /validator/tests/_shared/install_override_debs.sh exec /validator/tests/_shared/run_library_tests.sh "$@"' validator-testcase libsodium usage-php83-r16-bin2hex-hex2bin-roundtrip -- bash -c 'PS4=$1; shift; set -x; source "$@"' validator-xtrace '__VALIDATOR_XTRACE__ ' /validator/tests/libsodium/tests/cases/usage/usage-php83-r16-bin2hex-hex2bin-roundtrip.sh no override packages found; continuing with apt originals $bin = random_bytes(32); $hex = sodium_bin2hex($bin); if (!is_string($hex)) { fwrite(STDERR, "hex not string\n"); exit(1); } if (strlen($hex) !== 64) { fwrite(STDERR, "hex len=" . strlen($hex) . "\n"); exit(1); } if ($hex !== strtolower($hex)) { fwrite(STDERR, "hex not lowercase\n"); exit(1); } if (!ctype_xdigit($hex)) { fwrite(STDERR, "hex contains non-hex chars\n"); exit(1); } $decoded = sodium_hex2bin($hex); if ($decoded !== $bin) { fwrite(STDERR, "roundtrip mismatch\n"); exit(1); } echo "ok ", strlen($hex), PHP_EOL; ' ok 64