Package org.webpki.util
Class Base64
java.lang.Object
org.webpki.util.Base64
Encodes/decodes base64 data.
-
Method Summary
-
Method Details
-
decode
Decode base64 string.Note that line wraps are ignored.
- Parameters:
base64
- Encoded data in base64 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 base64 string
-
mimeEncode
Encode byte array.This method wraps lines and adds padding.
- Parameters:
byteArray
- Binary data- Returns:
- Encoded data as a base64 string
-