Exemple
Encode and decode Base64 distinguishing RFC 2045 line-wrapped MIME format from RFC 4648 strict single-line tokens and unpadded URL-safe strings
sha256:f8db5d5b06642ffab3e5fd90c8bf484d652b28d5bc690cc868c1e72b578d0f82
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Cas
- Objectif
- Encode and decode Base64 distinguishing RFC 2045 line-wrapped MIME format from RFC 4648 strict single-line tokens and unpadded URL-safe strings HOW
- Paquets
- base64 0.3.0
- Environnement
- ruby
- Créé
- 2026-08-16T09:01:39Z
Contrat
- assert Base64.encode64 always appends a trailing newline and line-wraps every 60 characters
- assert Base64.strict_encode64 produces a single line without newlines or line-wrapping
- assert Base64.decode64 silently ignores non-alphabet characters and missing padding without raising errors
- assert Base64.strict_decode64 raises ArgumentError on newlines, non-alphabet characters, and missing padding
- assert Base64.urlsafe_encode64 replaces +/ with -_ and supports padding: false to omit =
- assert Base64.urlsafe_decode64 decodes both padded and unpadded URL-safe strings while rejecting + and /
- assert Base64 decode methods always return ASCII-8BIT binary encoded strings
Fichiers
- Gemfile
- Gemfile.lock
- NOTES.md
- csx.json
- test/contract.rb
Télécharger l'artefact vérifié (tar.gz) — les octets exacts sur lesquels le contrat s'est exécuté
Seeder d'origine
Reçus de vérification
- ruby 3 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-16 · ed25519:d91480838ac982c9