Class CachingSha2PasswordFlow
- java.lang.Object
-
- org.mariadb.r2dbc.authentication.standard.Sha256PasswordPluginFlow
-
- org.mariadb.r2dbc.authentication.standard.CachingSha2PasswordFlow
-
- All Implemented Interfaces:
AuthenticationPlugin
public final class CachingSha2PasswordFlow extends Sha256PasswordPluginFlow
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCachingSha2PasswordFlow.State
-
Constructor Summary
Constructors Constructor Description CachingSha2PasswordFlow()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CachingSha2PasswordFlowcreate()ClientMessagenext(MariadbConnectionConfiguration configuration, byte[] seed, Sequencer sequencer, AuthMoreData authMoreData)voidsetStateFastAuth()static byte[]sha256encryptPassword(CharSequence password, byte[] seed)Send a SHA-2 encrypted password.Stringtype()-
Methods inherited from class org.mariadb.r2dbc.authentication.standard.Sha256PasswordPluginFlow
generatePublicKey, readPublicKey, readPublicKeyFromFile
-
-
-
-
Field Detail
-
TYPE
public static final String TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
sha256encryptPassword
public static byte[] sha256encryptPassword(CharSequence password, byte[] seed)
Send a SHA-2 encrypted password. encryption XOR(SHA256(password), SHA256(seed, SHA256(SHA256(password))))- Parameters:
password- passwordseed- seed- Returns:
- encrypted pwd
-
create
public CachingSha2PasswordFlow create()
- Specified by:
createin interfaceAuthenticationPlugin- Overrides:
createin classSha256PasswordPluginFlow
-
type
public String type()
- Specified by:
typein interfaceAuthenticationPlugin- Overrides:
typein classSha256PasswordPluginFlow
-
setStateFastAuth
public void setStateFastAuth()
-
next
public ClientMessage next(MariadbConnectionConfiguration configuration, byte[] seed, Sequencer sequencer, AuthMoreData authMoreData) throws io.r2dbc.spi.R2dbcException
- Specified by:
nextin interfaceAuthenticationPlugin- Overrides:
nextin classSha256PasswordPluginFlow- Throws:
io.r2dbc.spi.R2dbcException
-
-