| Package | Description |
|---|---|
| com.ongres.scram.client |
This module expose the client implementation of Salted Challenge Response
Authentication Mechanism (SCRAM).
|
| com.ongres.scram.common |
This package expose the messages used to implement a client/server of Salted Challenge Response
Authentication Mechanism (SCRAM).
|
| Modifier and Type | Method and Description |
|---|---|
ScramMechanism |
ScramClient.getScramMechanism()
Returns the scram mechanism negotiated by this SASL client.
|
| Modifier and Type | Method and Description |
|---|---|
static @Nullable ScramMechanism |
ScramMechanism.byName(@NotNull String name)
Gets a SCRAM mechanism given its standard IANA name, supported by the Java security provider.
|
static ScramMechanism |
ScramMechanism.valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ScramMechanism[] |
ScramMechanism.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
ScramFunctions.clientKey(@NotNull ScramMechanism scramMechanism,
byte[] saltedPassword)
Generates a client key, from the salted password.
|
static byte[] |
ScramFunctions.clientSignature(@NotNull ScramMechanism scramMechanism,
byte[] storedKey,
@NotNull String authMessage)
Computes the SCRAM client signature.
|
static byte[] |
ScramFunctions.hash(@NotNull ScramMechanism scramMechanism,
byte[] message)
Computes the hash function of a given value, based on the SCRAM mechanism hash function.
|
static byte[] |
ScramFunctions.hmac(@NotNull ScramMechanism scramMechanism,
byte[] key,
byte[] message)
Computes the HMAC of the message and key, using the given SCRAM mechanism.
|
static byte[] |
ScramFunctions.saltedPassword(@NotNull ScramMechanism scramMechanism,
@NotNull StringPreparation stringPreparation,
char[] password,
byte[] salt,
int iterationCount)
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(@NotNull ScramMechanism scramMechanism,
byte[] saltedPassword)
Generates a server key, from the salted password.
|
static byte[] |
ScramFunctions.serverSignature(@NotNull ScramMechanism scramMechanism,
byte[] serverKey,
@NotNull String authMessage)
Compute the SCRAM server signature.
|
static byte[] |
ScramFunctions.storedKey(@NotNull ScramMechanism scramMechanism,
byte[] clientKey)
Generates a stored key, from the salted password.
|
static boolean |
ScramFunctions.verifyClientProof(@NotNull ScramMechanism scramMechanism,
byte[] clientProof,
byte[] storedKey,
@NotNull 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–2025 OnGres, Inc. All rights reserved.