org.apache.directory.shared.ldap.codec.bind
Class SimpleAuthentication

java.lang.Object
  extended by org.apache.directory.shared.asn1.Asn1Object
      extended by org.apache.directory.shared.ldap.codec.bind.LdapAuthentication
          extended by org.apache.directory.shared.ldap.codec.bind.SimpleAuthentication

public class SimpleAuthentication
extends LdapAuthentication

A ldapObject which stores the Simple authentication for a BindRequest.

Author:
Apache Directory Project

Field Summary
 
Fields inherited from class org.apache.directory.shared.asn1.Asn1Object
parent
 
Constructor Summary
SimpleAuthentication()
           
 
Method Summary
 int computeLength()
          Compute the Simple authentication length Simple authentication : 0x80 L1 simple L1 = Length(simple) Length(Simple authentication) = Length(0x80) + Length(L1) + Length(simple)
 ByteBuffer encode(ByteBuffer buffer)
          Encode the simple authentication to a PDU.
 byte[] getSimple()
          Get the simple password
 void setSimple(byte[] simple)
          Set the simple password
 String toString()
          Return the simple authentication as a string
 
Methods inherited from class org.apache.directory.shared.asn1.Asn1Object
addLength, getCurrentLength, getExpectedLength, getParent, getTlvId, setCurrentLength, setExpectedLength, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleAuthentication

public SimpleAuthentication()
See Also:
Asn1Object#Asn1Object
Method Detail

getSimple

public byte[] getSimple()
Get the simple password

Returns:
The password

setSimple

public void setSimple(byte[] simple)
Set the simple password

Parameters:
simple - The simple password

computeLength

public int computeLength()
Compute the Simple authentication length Simple authentication : 0x80 L1 simple L1 = Length(simple) Length(Simple authentication) = Length(0x80) + Length(L1) + Length(simple)

Specified by:
computeLength in class Asn1Object
Returns:
The object's computed length

encode

public ByteBuffer encode(ByteBuffer buffer)
                  throws EncoderException
Encode the simple authentication to a PDU. SimpleAuthentication : 0x80 LL simple

Overrides:
encode in class Asn1Object
Parameters:
buffer - The buffer where to put the PDU
Returns:
The PDU.
Throws:
EncoderException

toString

public String toString()
Return the simple authentication as a string

Overrides:
toString in class Object
Returns:
The simple authentication string.


Copyright © 2004-2012. All Rights Reserved.