Package com.unboundid.ldap.listener
Class Base64PasswordEncoderOutputFormatter
java.lang.Object
com.unboundid.ldap.listener.PasswordEncoderOutputFormatter
com.unboundid.ldap.listener.Base64PasswordEncoderOutputFormatter
@ThreadSafety(level=COMPLETELY_THREADSAFE)
public final class Base64PasswordEncoderOutputFormatter
extends PasswordEncoderOutputFormatter
This class provides an implementation of a password encoder output formatter
that will format the encoded password using the base64 mechanism described in
RFC 4648.
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]format(byte[] unformattedData) Formats the provided data in accordance with this output format.Retrieves the singleton instance of this base64 password encoder output formatter.voidtoString(StringBuilder buffer) Appends a string representation of this password encoder output formatter to the provided buffer.byte[]unFormat(byte[] formattedData) Reverses the formatting that has been applied to the provided data.Methods inherited from class com.unboundid.ldap.listener.PasswordEncoderOutputFormatter
toString
-
Method Details
-
getInstance
Retrieves the singleton instance of this base64 password encoder output formatter.- Returns:
- The singleton instance of this base64 password encoder output formatter.
-
format
Formats the provided data in accordance with this output format.- Specified by:
formatin classPasswordEncoderOutputFormatter- Parameters:
unformattedData- The data to be formatted. It must not benull.- Returns:
- A formatted representation of the provided data.
- Throws:
LDAPException- If a problem is encountered while formatting the provided data.
-
unFormat
Reverses the formatting that has been applied to the provided data.- Specified by:
unFormatin classPasswordEncoderOutputFormatter- Parameters:
formattedData- The formatted data to be un-formatted. It must not benull.- Returns:
- The un-formatted version of the provided data.
- Throws:
LDAPException- If the provided data does not represent a valid encoding, or if a problem is encountered while un-formatting the provided data.
-
toString
Appends a string representation of this password encoder output formatter to the provided buffer.- Specified by:
toStringin classPasswordEncoderOutputFormatter- Parameters:
buffer- The buffer to which the information should be appended.
-