0.0
The project is in a healthy, maintained state
This gem has the encode_base64 method that encodes UTF-8 strings tobase64 (UTF-8) string, the decode_base64 method that decodes base64 string to UTF-8 string.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies
 Project Readme

Base64encoding

Created for the course "Stack of programming technologies" V. N. Karazin Kharkiv National University

Ruby 3.3.5 Base64encoding gem.


A gem for Base64 encoding and decoding.

This gem has methods:

  • encode_base64 - method that encodes UTF-8 strings to base64 (UTF-8) string
  • decode_base64 - method that decodes base64 string to UTF-8 string.

Installation

Install the gem and add to the application's Gemfile by executing:

bundle add Base64encoding

If bundler is not being used to manage dependencies, install the gem by executing:

gem install Base64encoding

Usage

require 'Base64encoding'

push(Base64encoding.encode_base64('Hello, World!'))
# "SGVsbG8sIFdvcmxkIQ=="

push(Base64encoding.decode_base64('SGVsbG8sIFdvcmxkIQ=='))
# "Hello, World!"