Package org.webpki.util
Class Base64URL
java.lang.Object
org.webpki.util.Base64URL
Encodes/decodes base64URL data.
See RFC 4648 Table 2.
-
Method Summary
-
Method Details
-
decode
Decode base64url string.This method does not accept padding or line wraps.
- Parameters:
base64Url
- Encoded data in base64url format- Returns:
- Decoded data as a byte array
- Throws:
IllegalArgumentException
-
decodePadded
Decode base64url string.This method accepts optional padding.
Note that line wraps are not permitted.
- Parameters:
base64Url
- Encoded data in base64url format- Returns:
- Decoded data as a byte array
- Throws:
IllegalArgumentException
-
encode
Encode byte array.This method adds no padding or line wraps.
- Parameters:
byteArray
- Binary data- Returns:
- Encoded data as a base64url string
-