tigase.auth
Class SaslPLAIN

java.lang.Object
  extended by tigase.auth.SaslPLAIN
All Implemented Interfaces:
javax.security.sasl.SaslServer

public class SaslPLAIN
extends java.lang.Object
implements javax.security.sasl.SaslServer

Describe class SaslPLAIN here. Created: Mon Nov 6 09:02:31 2006

Version:
$Rev: 630 $
Author:
Artur Hefczyc

Field Summary
static java.lang.String ENCRYPTION_KEY
           
static java.lang.String ENCRYPTION_LS_MD5
          This is LibreSource variant of encoding MD5 sum.
static java.lang.String ENCRYPTION_MD5
           
static java.lang.String ENCRYPTION_PLAIN
           
static java.lang.String ENCRYPTION_SHA
           
 
Constructor Summary
  SaslPLAIN()
          Creates a new SaslPLAIN instance.
protected SaslPLAIN(java.util.Map<? super java.lang.String,?> props, javax.security.auth.callback.CallbackHandler callbackHandler)
           
 
Method Summary
 void dispose()
          Describe dispose method here.
 byte[] evaluateResponse(byte[] byteArray)
          Describe evaluateResponse method here.
 java.lang.String getAuthorizationID()
          Describe getAuthorizationID method here.
 java.lang.String getMechanismName()
          Describe getMechanismName method here.
 java.lang.Object getNegotiatedProperty(java.lang.String string)
          Describe getNegotiatedProperty method here.
 boolean isComplete()
          Describe isComplete method here.
 byte[] unwrap(byte[] byteArray, int n, int n1)
          Describe unwrap method here.
 byte[] wrap(byte[] byteArray, int n, int n1)
          Describe wrap method here.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENCRYPTION_KEY

public static final java.lang.String ENCRYPTION_KEY
See Also:
Constant Field Values

ENCRYPTION_PLAIN

public static final java.lang.String ENCRYPTION_PLAIN
See Also:
Constant Field Values

ENCRYPTION_MD5

public static final java.lang.String ENCRYPTION_MD5
See Also:
Constant Field Values

ENCRYPTION_LS_MD5

public static final java.lang.String ENCRYPTION_LS_MD5
This is LibreSource variant of encoding MD5 sum. The calculation is done the same way but HEX representation of the sum is different:
        StringBuilder sb = new StringBuilder();
        for (byte b: md5) {
    sb.append(Integer.toHexString(b));
        }
        

See Also:
Constant Field Values

ENCRYPTION_SHA

public static final java.lang.String ENCRYPTION_SHA
See Also:
Constant Field Values
Constructor Detail

SaslPLAIN

public SaslPLAIN()
Creates a new SaslPLAIN instance.


SaslPLAIN

protected SaslPLAIN(java.util.Map<? super java.lang.String,?> props,
                    javax.security.auth.callback.CallbackHandler callbackHandler)
Method Detail

unwrap

public byte[] unwrap(byte[] byteArray,
                     int n,
                     int n1)
              throws javax.security.sasl.SaslException
Describe unwrap method here.

Specified by:
unwrap in interface javax.security.sasl.SaslServer
Parameters:
byteArray - a byte[] value
n - an int value
n1 - an int value
Returns:
a byte[] value
Throws:
javax.security.sasl.SaslException - if an error occurs

evaluateResponse

public byte[] evaluateResponse(byte[] byteArray)
                        throws javax.security.sasl.SaslException
Describe evaluateResponse method here.

Specified by:
evaluateResponse in interface javax.security.sasl.SaslServer
Parameters:
byteArray - a byte[] value
Returns:
a byte[] value
Throws:
javax.security.sasl.SaslException - if an error occurs

getAuthorizationID

public java.lang.String getAuthorizationID()
Describe getAuthorizationID method here.

Specified by:
getAuthorizationID in interface javax.security.sasl.SaslServer
Returns:
a String value

getMechanismName

public java.lang.String getMechanismName()
Describe getMechanismName method here.

Specified by:
getMechanismName in interface javax.security.sasl.SaslServer
Returns:
a String value

getNegotiatedProperty

public java.lang.Object getNegotiatedProperty(java.lang.String string)
Describe getNegotiatedProperty method here.

Specified by:
getNegotiatedProperty in interface javax.security.sasl.SaslServer
Parameters:
string - a String value
Returns:
an Object value

isComplete

public boolean isComplete()
Describe isComplete method here.

Specified by:
isComplete in interface javax.security.sasl.SaslServer
Returns:
a boolean value

wrap

public byte[] wrap(byte[] byteArray,
                   int n,
                   int n1)
            throws javax.security.sasl.SaslException
Describe wrap method here.

Specified by:
wrap in interface javax.security.sasl.SaslServer
Parameters:
byteArray - a byte[] value
n - an int value
n1 - an int value
Returns:
a byte[] value
Throws:
javax.security.sasl.SaslException - if an error occurs

dispose

public void dispose()
             throws javax.security.sasl.SaslException
Describe dispose method here.

Specified by:
dispose in interface javax.security.sasl.SaslServer
Throws:
javax.security.sasl.SaslException - if an error occurs


Copyright © 2009 Tigase. All Rights Reserved.