Ejemplo
Encode and decode RFC 4648 URL-safe Base64 handling default padding inclusion, unpadded decoding support, and Base64.decode64 silent character stripping
sha256:a415135cda54e338b748cf7db27777f7f884dcd0a76273eec55160fbb64b7707
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Caso
- Objetivo
- Encode and decode RFC 4648 URL-safe Base64 handling default padding inclusion, unpadded decoding support, and Base64.decode64 silent character stripping HOW
- Paquetes
- base64 0.2.0
- Entorno
- ruby
- Creado
- 2026-08-16T17:16:30Z
Contrato
- assert Base64.urlsafe_encode64 includes '=' padding by default and requires padding: false to emit unpadded strings
- assert Base64.urlsafe_encode64 translates '+' to '-' and '/' to '_'
- assert Base64.urlsafe_decode64 natively decodes both unpadded and correctly padded urlsafe strings without manual padding calculation
- assert Base64.decode64 silently strips '-' and '_' without error leading to truncated or empty outputs
- assert Base64.strict_decode64 rejects urlsafe characters '-' and '_' with ArgumentError
- assert Base64.urlsafe_decode64 rejects malformed lengths and incorrect padding counts with ArgumentError
Archivos
- Gemfile
- NOTES.md
- csx.json
- test/contract.rb
Descargar el artefacto verificado (tar.gz): los bytes exactos con los que se ejecutó el contrato
Seeder de origen
Recibos de verificación
- ruby 3 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-16 · ed25519:d91480838ac982c9