public final class Base64 extends Object
NOTE: the JDK class DatatypeConverter provides
similar functionality, however the methods are better suited to the LDAP SDK.
For example, the JDK encoder does not handle array/offset/len parameters, and
the decoder ignores invalid Base64 data.
| Modifier and Type | Method and Description |
|---|---|
static ByteString |
decode(String base64)
Decodes the provided base64 encoded data.
|
static String |
encode(byte[] bytes)
Encodes the provided data as a base64 string.
|
static String |
encode(ByteSequence bytes)
Encodes the provided data as a base64 string.
|
public static ByteString decode(String base64)
base64 - The base64 encoded data.org.forgerock.i18n.LocalizedIllegalArgumentException - If a problem occurs while attempting to decode base64
.NullPointerException - If base64 was null.public static String encode(byte[] bytes)
bytes - The data to be encoded.bytes.NullPointerException - If bytes was null.public static String encode(ByteSequence bytes)
bytes - The data to be encoded.bytes.NullPointerException - If bytes was null.Copyright © 2017-2020 Wren Security. All Rights Reserved.