public abstract class AbstractSaslSCRAM extends AbstractSasl
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractSaslSCRAM.BindType |
| Modifier and Type | Field and Description |
|---|---|
protected static byte[] |
DEFAULT_CLIENT_KEY |
protected static byte[] |
DEFAULT_SERVER_KEY |
static String |
LOCAL_CERTIFICATE_KEY |
static String |
TLS_UNIQUE_ID_KEY |
authorizedId, callbackHandler, complete, log, negotiatedProperty, props, SASL_STRICT_MODE_KEY| 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) |
| Modifier and Type | Method and Description |
|---|---|
protected byte[] |
calculateC() |
protected abstract void |
checkRequestedBindType(AbstractSaslSCRAM.BindType requestedBindType) |
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) |
protected void |
validateBindingsData(AbstractSaslSCRAM.BindType requestedBindType,
byte[] bindingData) |
byte[] |
wrap(byte[] outgoing,
int offset,
int len) |
protected byte[] |
xor(byte[] a,
byte[] b) |
dispose, getNegotiatedProperty, handleCallbacks, isAuthzIDIgnored, isComplete, isEmpty, splitpublic static final String TLS_UNIQUE_ID_KEY
public static final String LOCAL_CERTIFICATE_KEY
protected static final byte[] DEFAULT_CLIENT_KEY
protected static final byte[] DEFAULT_SERVER_KEY
protected AbstractSaslSCRAM(String mechanismName, String algorithm, byte[] clientKey, byte[] serverKey, Map<? super String,?> props, CallbackHandler callbackHandler)
public static byte[] hi(String algorithm, byte[] password, byte[] salt, int iterations) throws InvalidKeyException, NoSuchAlgorithmException
protected static byte[] hmac(SecretKey key, byte[] data) throws NoSuchAlgorithmException, InvalidKeyException
public static byte[] normalize(String str)
protected byte[] calculateC()
protected abstract void checkRequestedBindType(AbstractSaslSCRAM.BindType requestedBindType) throws SaslException
SaslExceptionpublic byte[] evaluateResponse(byte[] response)
throws SaslException
SaslExceptionpublic String getAuthorizationID()
public String getMechanismName()
protected byte[] h(byte[] data)
throws NoSuchAlgorithmException
NoSuchAlgorithmExceptionprotected SecretKey key(byte[] key)
protected byte[] processClientFirstMessage(byte[] data)
throws SaslException,
InvalidKeyException,
NoSuchAlgorithmException
protected byte[] processClientLastMessage(byte[] data)
throws SaslException,
InvalidKeyException,
NoSuchAlgorithmException
public byte[] unwrap(byte[] incoming,
int offset,
int len)
throws SaslException
SaslExceptionprotected void validateBindingsData(AbstractSaslSCRAM.BindType requestedBindType, byte[] bindingData) throws SaslException
SaslExceptionpublic byte[] wrap(byte[] outgoing,
int offset,
int len)
throws SaslException
SaslExceptionprotected byte[] xor(byte[] a,
byte[] b)
Copyright © 2018 "Tigase, Inc.". All rights reserved.