$ docker run --rm --name validator-libsodium-usage-ruby-rbnacl-simplebox-roundtrip-2732 -t --mount type=bind,src=/tmp/validator-status-libsodium-usage-ruby-rbnacl-simplebox-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-ruby-rbnacl-simplebox-roundtrip -- bash -c 'PS4=$1; shift; set -x; source "$@"' validator-xtrace '__VALIDATOR_XTRACE__ ' /validator/tests/libsodium/tests/cases/usage/usage-ruby-rbnacl-simplebox-roundtrip.sh no override packages found; continuing with apt originals key = ("\x00".b * RbNaCl::SecretBox.key_bytes) box = RbNaCl::SimpleBox.from_secret_key(key) plaintext = "the quick brown fox jumps over the lazy dog" ciphertext = box.encrypt(plaintext) raise "ciphertext same as plaintext" if ciphertext == plaintext recovered = box.decrypt(ciphertext) raise "roundtrip mismatch: #{recovered.inspect}" unless recovered == plaintext puts "ok #{recovered.bytesize}" ' ok 43