tigase.auth.mechanisms

## Class AbstractSaslSCRAM

- java.lang.Object
- - tigase.auth.mechanisms.AbstractSasl
  - - tigase.auth.mechanisms.AbstractSaslSCRAM

- All Implemented Interfaces:
    SaslServer
  Direct Known Subclasses:
    SaslSCRAM

      public abstract class AbstractSaslSCRAM
      extends AbstractSasl

- - ### Field Summary

    - ### Fields inherited from class tigase.auth.mechanisms.AbstractSasl

      `authorizedId, callbackHandler, complete, negotiatedProperty, props, SASL_STRICT_MODE_KEY`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `AbstractSaslSCRAM(String mechanismName, String algorithm, byte[] clientKey, byte[] serverKey, Map<? super String,?> props, CallbackHandler callbackHandler)`
    `protected` | `AbstractSaslSCRAM(String mechanismName, String algorithm, byte[] clientKey, byte[] serverKey, Map<? super String,?> props, CallbackHandler callbackHandler, String serverOnce)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `byte[]` | `evaluateResponse(byte[] response)`
    `String` | `getAuthorizationID()`
    `String` | `getMechanismName()`
    `protected byte[]` | `h(byte[] data)`
    `static byte[]` | `hi(String algorithm, byte[] password, byte[] salt, int iterations)`
    `protected static byte[]` | `hmac(SecretKey key, byte[] data)`
    `protected SecretKey` | `key(byte[] key)`
    `static byte[]` | `normalize(String str)`
    `protected byte[]` | `processClientFirstMessage(byte[] data)`
    `protected byte[]` | `processClientLastMessage(byte[] data)`
    `byte[]` | `unwrap(byte[] incoming, int offset, int len)`
    `byte[]` | `wrap(byte[] outgoing, int offset, int len)`
    `protected byte[]` | `xor(byte[] a, byte[] b)`

    - ### Methods inherited from class tigase.auth.mechanisms.AbstractSasl

      `dispose, getNegotiatedProperty, handleCallbacks, isAuthzIDIgnored, isComplete, isEmpty, split`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AbstractSaslSCRAM

          protected AbstractSaslSCRAM(String mechanismName,
                                      String algorithm,
                                      byte[] clientKey,
                                      byte[] serverKey,
                                      Map<? super String,?> props,
                                      CallbackHandler callbackHandler)

    - #### AbstractSaslSCRAM

          protected AbstractSaslSCRAM(String mechanismName,
                                      String algorithm,
                                      byte[] clientKey,
                                      byte[] serverKey,
                                      Map<? super String,?> props,
                                      CallbackHandler callbackHandler,
                                      String serverOnce)

  - ### Method Detail

    - #### hi

          public static byte[] hi(String algorithm,
                                  byte[] password,
                                  byte[] salt,
                                  int iterations)
                           throws InvalidKeyException,
                                  NoSuchAlgorithmException

      Throws:
        `InvalidKeyException`
        `NoSuchAlgorithmException`

    - #### hmac

          protected static byte[] hmac(SecretKey key,
                                       byte[] data)
                                throws NoSuchAlgorithmException,
                                       InvalidKeyException

      Throws:
        `NoSuchAlgorithmException`
        `InvalidKeyException`

    - #### normalize

          public static byte[] normalize(String str)

    - #### evaluateResponse

          public byte[] evaluateResponse(byte[] response)
                                  throws SaslException

      Throws:
        `SaslException`

    - #### getAuthorizationID

          public String getAuthorizationID()

    - #### getMechanismName

          public String getMechanismName()

    - #### h

          protected byte[] h(byte[] data)
                      throws NoSuchAlgorithmException

      Throws:
        `NoSuchAlgorithmException`

    - #### key

          protected SecretKey key(byte[] key)

    - #### processClientFirstMessage

          protected byte[] processClientFirstMessage(byte[] data)
                                              throws SaslException,
                                                     InvalidKeyException,
                                                     NoSuchAlgorithmException

      Throws:
        `SaslException`
        `InvalidKeyException`
        `NoSuchAlgorithmException`

    - #### processClientLastMessage

          protected byte[] processClientLastMessage(byte[] data)
                                             throws SaslException,
                                                    InvalidKeyException,
                                                    NoSuchAlgorithmException

      Throws:
        `SaslException`
        `InvalidKeyException`
        `NoSuchAlgorithmException`

    - #### unwrap

          public byte[] unwrap(byte[] incoming,
                               int offset,
                               int len)
                        throws SaslException

      Throws:
        `SaslException`

    - #### wrap

          public byte[] wrap(byte[] outgoing,
                             int offset,
                             int len)
                      throws SaslException

      Throws:
        `SaslException`

    - #### xor

          protected byte[] xor(byte[] a,
                               byte[] b)

Copyright © 2016 "Tigase, Inc.". All rights reserved.