Package | Description |
---|---|
com.ongres.scram.client | |
com.ongres.scram.common |
Modifier and Type | Field and Description |
---|---|
protected Optional<ScramMechanism> |
ScramClient.PreBuilder2.channelBindingMechanism |
protected Optional<ScramMechanism> |
ScramClient.PreBuilder2.nonChannelBindingMechanism |
Modifier and Type | Method and Description |
---|---|
ScramMechanism |
ScramClient.getScramMechanism() |
Modifier and Type | Method and Description |
---|---|
ScramClient.Builder |
ScramClient.PreBuilder2.selectClientMechanism(ScramMechanism scramMechanism)
Select a fixed client mechanism.
|
Constructor and Description |
---|
ScramSession(ScramMechanism scramMechanism,
StringPreparation stringPreparation,
String user,
String nonce)
Constructs a SCRAM client, to perform an authentication for a given user.
|
Modifier and Type | Class and Description |
---|---|
class |
ScramMechanisms
SCRAM Mechanisms supported by this library.
|
Modifier and Type | Method and Description |
---|---|
static Optional<ScramMechanism> |
ScramMechanisms.selectMatchingMechanism(boolean channelBinding,
String... peerMechanisms)
This class classifies SCRAM mechanisms by two properties: whether they support channel binding;
and a priority, which is higher for safer algorithms (like SHA-256 vs SHA-1).
|
Modifier and Type | Method and Description |
---|---|
static byte[] |
ScramFunctions.clientKey(ScramMechanism scramMechanism,
byte[] saltedPassword)
Generates a client key, from the salted password.
|
static byte[] |
ScramFunctions.clientKey(ScramMechanism scramMechanism,
StringPreparation stringPreparation,
String password,
byte[] salt,
int iteration)
Generates a client key from the password and salt.
|
static byte[] |
ScramFunctions.clientSignature(ScramMechanism scramMechanism,
byte[] storedKey,
String authMessage)
Computes the SCRAM client signature.
|
static byte[] |
ScramFunctions.hash(ScramMechanism scramMechanism,
byte[] value)
Computes the hash function of a given value, based on the SCRAM mechanism hash function.
|
static byte[] |
ScramFunctions.hmac(ScramMechanism scramMechanism,
byte[] message,
byte[] key)
Computes the HMAC of the message and key, using the given SCRAM mechanism.
|
static byte[] |
ScramFunctions.saltedPassword(ScramMechanism scramMechanism,
StringPreparation stringPreparation,
String password,
byte[] salt,
int iteration)
Compute the salted password, based on the given SCRAM mechanism, the String preparation algorithm,
the provided salt and the number of iterations.
|
static byte[] |
ScramFunctions.serverKey(ScramMechanism scramMechanism,
byte[] saltedPassword)
Generates a server key, from the salted password.
|
static byte[] |
ScramFunctions.serverKey(ScramMechanism scramMechanism,
StringPreparation stringPreparation,
String password,
byte[] salt,
int iteration)
Generates a server key from the password and salt.
|
static byte[] |
ScramFunctions.serverSignature(ScramMechanism scramMechanism,
byte[] serverKey,
String authMessage)
Compute the SCRAM server signature.
|
static byte[] |
ScramFunctions.storedKey(ScramMechanism scramMechanism,
byte[] clientKey)
Generates a stored key, from the salted password.
|
static boolean |
ScramFunctions.verifyClientProof(ScramMechanism scramMechanism,
byte[] clientProof,
byte[] storedKey,
String authMessage)
Verifies that a provided client proof is correct.
|
static boolean |
ScramFunctions.verifyServerSignature(ScramMechanism scramMechanism,
byte[] serverKey,
String authMessage,
byte[] serverSignature)
Verifies that a provided server proof is correct.
|
Copyright © 2017. All rights reserved.