Project

base64url

0.0
No commit activity in last 3 years
No release in over 3 years
A base64url encode/decode library
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

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 © 2012 Yusuke Nojima. See LICENSE.txt for further details.