A module that can Encode/Decode a string in Base45.
See: https://datatracker.ietf.org/doc/rfc9285/
Encodes a string in Base45.
Item | Description | |
---|---|---|
@param | [String] bytes | the string to be encoded |
@return | [String] | a Base45-encoded string |
require 'base45'
Base45::encode("Hello!!") #=> "%69 VD92EX0"
Decodes a Base45-encoded string.
Item | Description | |
---|---|---|
@param | [String] b45 | the Base45-encoded string to be decoded |
@return | [String] | the decoded bytes, as a string |
require 'base45'
Base45::decode("QED8WEX0") #=> "ietf!"