base64url¶ ↑
A base64url encoding/decoding library.
The Base64URL module provides for the encoding and decoding of binary data using a base64url representation.
base64url encoding is Base64 for URLs and filenames. base64url’s 62nd and 63rd chars are ‘-’ and ‘_’. base64url does not have pad chars ‘=’.
Example¶ ↑
A simple encoding and decoding.
require "base64url" enc = Base64URL.encode('Send reinforcements') # -> "U2VuZCByZWluZm9yY2VtZW50cw" plain = Base64URL.decode(enc) # -> "Send reinforcements"
Copyright¶ ↑
Copyright © 2012 Yusuke Nojima. See LICENSE.txt for further details.