Class Base64
java.lang.Object
com.codename1.backend.Base64
Standard base64 (RFC 4648 section 4), with padding.
Not Base64Url: that one is the URL-safe alphabet with the padding
stripped, because that is what JWT specifies. These two alphabets are not
interchangeable, and the protocols that need this one -- SCRAM-SHA-256 in the
PostgreSQL handshake, and AWS request signing -- reject the other.
Decoding is strict about length and alphabet. A lenient decoder is how a
signature comparison ends up accepting more than one encoding of the same
bytes; see the note in Base64Url.
-
Method Summary
-
Method Details
-
encode
-
decode
The decoded bytes, or null when the input is not valid base64.
-