Created
January 22, 2019 04:23
-
-
Save parzibyte/cc9ec9de33037a38d1d86bc284429f2e to your computer and use it in GitHub Desktop.
Codificar y decodificar base64 created by parzibyte - https://repl.it/@parzibyte/Codificar-y-decodificar-base64
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=begin | |
Codificar y decodificar Base 64 en Ruby | |
@author parzibyte | |
=end | |
require "base64" | |
mensaje = "Hola, mundo. Vamos a codificar en base64 con Ruby desde parzibyte.me" | |
codificado = Base64.encode64 mensaje | |
puts "Codificado es '#{codificado}'" | |
decodificado = Base64.decode64 codificado | |
puts "Y decodificado (de vuelta al original) es '#{decodificado}'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment