base64Url top-level constant

Base64Codec const base64Url

A base64url encoder and decoder.

It encodes and decodes using the base64url alphabet, decodes using both the base64 and base64url alphabets, does not allow invalid characters and requires padding.

Examples:

var encoded = base64Url.encode([0x62, 0x6c, 0xc3, 0xa5, 0x62, 0xc3, 0xa6,
                                0x72, 0x67, 0x72, 0xc3, 0xb8, 0x64]);
var decoded = base64Url.decode("YmzDpWLDpnJncsO4ZAo=");

Implementation

const Base64Codec base64Url = Base64Codec.urlSafe();

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.13.0/dart-convert/base64Url-constant.html