$ docker run --rm --name validator-libsodium-usage-php83-r15-generichash-explicit-length-32-48096 -t --mount type=bind,src=/tmp/validator-status-libsodium-usage-php83-r15-generichash-explicit-length-32,dst=/validator/status --mount type=bind,src=/home/runner/work/validator/validator/.work/pages-artifacts/debs/port/libsodium,dst=/override-debs,readonly 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-r15-generichash-explicit-length-32 -- bash -c 'PS4=$1; shift; set -x; source "$@"' validator-xtrace '__VALIDATOR_XTRACE__ ' /validator/tests/libsodium/tests/cases/usage/usage-php83-r15-generichash-explicit-length-32.sh installing override packages from /override-debs (Reading database ... (Reading database ... 5%(Reading database ... 10%(Reading database ... 15%(Reading database ... 20%(Reading database ... 25%(Reading database ... 30%(Reading database ... 35%(Reading database ... 40%(Reading database ... 45%(Reading database ... 50%(Reading database ... 55%(Reading database ... 60%(Reading database ... 65%(Reading database ... 70%(Reading database ... 75%(Reading database ... 80%(Reading database ... 85%(Reading database ... 90%(Reading database ... 95%(Reading database ... 100%(Reading database ... 22270 files and directories currently installed.) Preparing to unpack .../libsodium-dev_1.0.18-1ubuntu0.24.04.1+safelibs1778011697_amd64.deb ... Unpacking libsodium-dev:amd64 (1.0.18-1ubuntu0.24.04.1+safelibs1778011697) over (1.0.18-1ubuntu0.24.04.1) ... Preparing to unpack .../libsodium23_1.0.18-1ubuntu0.24.04.1+safelibs1778011697_amd64.deb ... Unpacking libsodium23:amd64 (1.0.18-1ubuntu0.24.04.1+safelibs1778011697) over (1.0.18-1ubuntu0.24.04.1) ... Setting up libsodium23:amd64 (1.0.18-1ubuntu0.24.04.1+safelibs1778011697) ... Setting up libsodium-dev:amd64 (1.0.18-1ubuntu0.24.04.1+safelibs1778011697) ... Processing triggers for libc-bin (2.39-0ubuntu8.7) ... $msg = "r15 php generichash payload"; $h1 = sodium_crypto_generichash($msg, "", 32); if (!is_string($h1)) { fwrite(STDERR, "not string\n"); exit(1); } if (strlen($h1) !== 32) { fwrite(STDERR, "len=" . strlen($h1) . "\n"); exit(1); } // Determinism. $h2 = sodium_crypto_generichash($msg, "", 32); if ($h1 !== $h2) { fwrite(STDERR, "non-deterministic generichash\n"); exit(1); } // Different input must produce a different digest. $h3 = sodium_crypto_generichash($msg . "!", "", 32); if ($h1 === $h3) { fwrite(STDERR, "digest collided across distinct inputs\n"); exit(1); } echo "ok ", bin2hex($h1), PHP_EOL; ' ok 8923c94b6d9b522862d3b742f4bb0004e984ea7af8043e715a8277c3cb5d9e4b