public abstract class AbstractScram
extends tigase.jaxmpp.core.client.xmpp.modules.auth.saslmechanisms.AbstractSaslMechanism
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractScram.BindType |
| Modifier and Type | Field and Description |
|---|---|
protected static Charset |
UTF_CHARSET |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractScram(String mechanismName,
String algorithm,
byte[] clientKey,
byte[] serverKey) |
| Modifier and Type | Method and Description |
|---|---|
String |
evaluateChallenge(String input,
tigase.jaxmpp.core.client.SessionObject sessionObject) |
protected abstract byte[] |
getBindData(AbstractScram.BindType bindType,
tigase.jaxmpp.core.client.SessionObject sessionObject) |
protected abstract AbstractScram.BindType |
getBindType(tigase.jaxmpp.core.client.SessionObject sessionObject) |
protected tigase.jaxmpp.core.client.xmpp.modules.auth.scram.AbstractScram.Data |
getData(tigase.jaxmpp.core.client.SessionObject sessionObject) |
protected byte[] |
h(byte[] data) |
static byte[] |
hi(String algorithm,
byte[] password,
byte[] salt,
int iterations) |
protected static byte[] |
hmac(SecretKey key,
byte[] data) |
boolean |
isAllowedToUse(tigase.jaxmpp.core.client.SessionObject sessionObject) |
protected SecretKey |
key(byte[] key) |
String |
name() |
static byte[] |
normalize(String str) |
protected String |
randomString() |
protected byte[] |
xor(byte[] a,
byte[] b) |
protected static final Charset UTF_CHARSET
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)
public String evaluateChallenge(String input, tigase.jaxmpp.core.client.SessionObject sessionObject) throws tigase.jaxmpp.core.client.xmpp.modules.auth.ClientSaslException
tigase.jaxmpp.core.client.xmpp.modules.auth.ClientSaslExceptionprotected abstract byte[] getBindData(AbstractScram.BindType bindType, tigase.jaxmpp.core.client.SessionObject sessionObject)
protected abstract AbstractScram.BindType getBindType(tigase.jaxmpp.core.client.SessionObject sessionObject)
protected tigase.jaxmpp.core.client.xmpp.modules.auth.scram.AbstractScram.Data getData(tigase.jaxmpp.core.client.SessionObject sessionObject)
protected byte[] h(byte[] data)
throws NoSuchAlgorithmException
NoSuchAlgorithmExceptionpublic boolean isAllowedToUse(tigase.jaxmpp.core.client.SessionObject sessionObject)
protected SecretKey key(byte[] key)
public String name()
protected String randomString()
protected byte[] xor(byte[] a,
byte[] b)
Copyright © 2006–2020 Tigase. All rights reserved.