Base64URL package for Apple platforms

Base64URL provides extensions to Data for encoding and decoding bytes to and from base64url encoding. Padding is optional for base64url encoded strings and this package always omits = padding.

See the variants summary table of the Wikipedia page for Base64 and section 5 of RFC 4648 for the specifics.

Usage

Installation

To use Base64URL with the Swift Package Manager, add the dependency to your Package.swift file:

let package = Package(
   dependencies: [
       .package(
           name: "Base64URL", 
           url: "https://github.com/shareup/base64url-apple.git", 
           from: "0.0.0"
       )
   ]
)

Dev setup

Please make sure swiftformat is installed:

$ brew install swiftformat

Please install the git pre-commit hook:

$ cp .pre-commit-hook .git/hooks/pre-commit