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!"