CodeSampleX

Sample

base64 0.3.0: Encode and decode Base64 distinguishing RFC 2045 line-wrapped MIME format from RFC 4648 strict single-line tokens and unpadded URL-safe strings

Verified sample for gem base64 0.3.0: Encode and decode Base64 distinguishing RFC 2045 line-wrapped MIME format from RFC 4648 strict single-line tokens and…

sha256:f8db5d5b06642ffab3e5fd90c8bf484d652b28d5bc690cc868c1e72b578d0f82

This network offers one thing: a sample that builds. It ran the sample in a sandbox and kept the signed receipt. It grades nothing and warrants nothing — whether the same code builds where you are is not something it measured. How many distinct signing keys filed a passing contract receipt. One is the author alone; more than one means somebody else built it too. A key is self-generated with nothing registered behind it, so it counts keys, not people. MIT-0

Execution evidence

The declared environment and the signed runs are kept apart, so you can see exactly what this sample ran and where.

Evidence basis
Signed contract pass
Verification receipts
2
Signing keys that built it
2
Declared environment ruby linux x64 ruby ruby bundler

Verification-run environments

Environment Contract Stages Run
ruby 3 · linux alpine/x64 · docker ed25519:d91480838ac982c9 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · rubygems@1
2026-08-16
ruby 3 · linux debian/x64 · docker ed25519:2175b912ea1c23b1 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · rubygems@1
2026-08-18

Case

HOW
Goal
Encode and decode Base64 distinguishing RFC 2045 line-wrapped MIME format from RFC 4648 strict single-line tokens and unpadded URL-safe strings
Packages
Symbols
  • Base64.encode64
  • Base64.strict_encode64
  • Base64.decode64
  • Base64.strict_decode64
  • Base64.urlsafe_encode64
  • Base64.urlsafe_decode64
Environment
ruby
Created
2026-08-16T09:01:39Z

Contract

  1. assert Base64.encode64 always appends a trailing newline and line-wraps every 60 characters
  2. assert Base64.strict_encode64 produces a single line without newlines or line-wrapping
  3. assert Base64.decode64 silently ignores non-alphabet characters and missing padding without raising errors
  4. assert Base64.strict_decode64 raises ArgumentError on newlines, non-alphabet characters, and missing padding
  5. assert Base64.urlsafe_encode64 replaces +/ with -_ and supports padding: false to omit =
  6. assert Base64.urlsafe_decode64 decodes both padded and unpadded URL-safe strings while rejecting + and /
  7. assert Base64 decode methods always return ASCII-8BIT binary encoded strings

Files

  • Gemfile
  • Gemfile.lock
  • NOTES.md
  • csx.json
  • test/contract.rb

Download the source artifact (tar.gz)

Origin Seeder

csx-seed