public enum ScramMechanism extends Enum<ScramMechanism>
SCRAM-SHA-1 and
SCRAM-SHA-256 are provided, since both the hash and the HMAC implementations are provided
by the Java JDK version 8 or greater.
MessageDigest: "Every implementation of the Java platform is required to
support the following standard MessageDigest algorithms: SHA-1, SHA-256".
Mac: "Every implementation of the Java platform is required to support
the following standard Mac algorithms: HmacSHA1, HmacSHA256".
| Enum Constant and Description |
|---|
SCRAM_SHA_1
SCRAM-SHA-1 mechanism, defined in RFC-5802.
|
SCRAM_SHA_1_PLUS
SCRAM-SHA-1-PLUS mechanism, defined in RFC-5802.
|
SCRAM_SHA_224
SCRAM-SHA-224 mechanism, not defined in an RFC.
|
SCRAM_SHA_224_PLUS
SCRAM-SHA-224-PLUS mechanism, not defined in an RFC.
|
SCRAM_SHA_256
SCRAM-SHA-256 mechanism, defined in RFC-7677.
|
SCRAM_SHA_256_PLUS
SCRAM-SHA-256-PLUS mechanism, defined in RFC-7677.
|
SCRAM_SHA_384
SCRAM-SHA-384 mechanism, not defined in an RFC.
|
SCRAM_SHA_384_PLUS
SCRAM-SHA-384-PLUS mechanism, not defined in an RFC.
|
SCRAM_SHA_512
SCRAM-SHA-512 mechanism.
|
SCRAM_SHA_512_PLUS
SCRAM-SHA-512-PLUS mechanism.
|
| Modifier and Type | Method and Description |
|---|---|
static @Nullable ScramMechanism |
byName(@NotNull String name)
Gets a SCRAM mechanism given its standard IANA name, supported by the Java security provider.
|
@NotNull String |
getName()
The name of the mechanism.
|
boolean |
isPlus()
The mechanism
-PLUS require channel binding. |
static @Unmodifiable @NotNull List<String> |
supportedMechanisms()
List all the supported SCRAM mechanisms by this client implementation.
|
static ScramMechanism |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ScramMechanism[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ScramMechanism SCRAM_SHA_1
public static final ScramMechanism SCRAM_SHA_1_PLUS
public static final ScramMechanism SCRAM_SHA_224
public static final ScramMechanism SCRAM_SHA_224_PLUS
public static final ScramMechanism SCRAM_SHA_256
public static final ScramMechanism SCRAM_SHA_256_PLUS
public static final ScramMechanism SCRAM_SHA_384
public static final ScramMechanism SCRAM_SHA_384_PLUS
public static final ScramMechanism SCRAM_SHA_512
public static final ScramMechanism SCRAM_SHA_512_PLUS
public static ScramMechanism[] values()
for (ScramMechanism c : ScramMechanism.values()) System.out.println(c);
public static ScramMechanism valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is null@NotNull public @NotNull String getName()
Must be a value registered under IANA: SASL SCRAM Family Mechanisms
public boolean isPlus()
-PLUS require channel binding.@Nullable public static @Nullable ScramMechanism byName(@NotNull @NotNull String name)
name - The standard IANA full name of the mechanism.Copyright © 2017–2025 OnGres, Inc. All rights reserved.