$ docker run --rm --name validator-libsodium-usage-ruby-rbnacl-r11-secretbox-corruption-detected-2732 -t --mount type=bind,src=/tmp/validator-status-libsodium-usage-ruby-rbnacl-r11-secretbox-corruption-detected,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-ruby-rbnacl-r11-secretbox-corruption-detected -- bash -c 'PS4=$1; shift; set -x; source "$@"' validator-xtrace '__VALIDATOR_XTRACE__ ' /validator/tests/libsodium/tests/cases/usage/usage-ruby-rbnacl-r11-secretbox-corruption-detected.sh no override packages found; continuing with apt originals key = ("k" * 32).b nonce = ("n" * 24).b msg = "rbnacl r11 secretbox payload".b box = RbNaCl::SecretBox.new(key) ct = box.encrypt(nonce, msg) abort "ciphertext == plaintext" if ct == msg abort "round-trip mismatch" unless box.decrypt(nonce, ct) == msg mutated = ct.dup mutated.setbyte(0, mutated.getbyte(0) ^ 0x01) begin box.decrypt(nonce, mutated) abort "forged ciphertext was accepted" rescue RbNaCl::CryptoError puts "ok" end ' ok