Package org.ldaptive

Class Credential


  • public class Credential
    extends java.lang.Object
    Provides convenience methods for converting the various types of passwords into a byte array.
    Author:
    Middleware Services
    • Constructor Summary

      Constructors 
      Constructor Description
      Credential​(byte[] password)
      Creates a new credential.
      Credential​(char[] password)
      Creates a new credential.
      Credential​(java.lang.String password)
      Creates a new credential.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] getBytes()
      Returns this credential as a byte array.
      char[] getChars()
      Returns this credential as a character array.
      java.lang.String getString()
      Returns this credential as a string.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Credential

        public Credential​(java.lang.String password)
        Creates a new credential.
        Parameters:
        password - converted from UTF-8 to a byte array
      • Credential

        public Credential​(char[] password)
        Creates a new credential.
        Parameters:
        password - converted from UTF-8 to a byte array
      • Credential

        public Credential​(byte[] password)
        Creates a new credential.
        Parameters:
        password - to store
    • Method Detail

      • getBytes

        public byte[] getBytes()
        Returns this credential as a byte array.
        Returns:
        credential bytes
      • getString

        public java.lang.String getString()
        Returns this credential as a string.
        Returns:
        credential string
      • getChars

        public char[] getChars()
        Returns this credential as a character array.
        Returns:
        credential characters
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object