org.ldaptive
Class Credential

java.lang.Object
  extended by org.ldaptive.Credential

public class Credential
extends Object

Provides convenience methods for converting the various types of passwords into a byte array.

Version:
$Revision: 2885 $ $Date: 2014-02-05 16:28:49 -0500 (Wed, 05 Feb 2014) $
Author:
Middleware Services

Constructor Summary
Credential(byte[] password)
          Creates a new credential.
Credential(char[] password)
          Creates a new credential.
Credential(String password)
          Creates a new credential.
 
Method Summary
 byte[] getBytes()
          Returns this credential as a byte array.
 char[] getChars()
          Returns this credential as a character array.
 String getString()
          Returns this credential as a string.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Credential

public Credential(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 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 String toString()

Overrides:
toString in class Object


Copyright © 2003-2015 Virginia Tech. All Rights Reserved.