Supports conversion to and from the base64 URL format. This format differs from normal base64 in that it only includes characters that can be used safely in a URL.
You can add this framework to your Xcode project using CocoaPods. Add the following to your Podfile:
pod 'base64url', '~> 1.0'
Convert a Data struct into a base64url string:
Data(bytes: [255, 1, 2]).base64urlEncodedString() // equals "_wEC"
Convert base64url string into a Data struct:
Data(base64urlEncoded: "AAECAw") // equals Data(bytes: [0, 1, 2, 3])