Class OldPasswordPlugin
- java.lang.Object
-
- org.mariadb.jdbc.internal.com.send.authentication.OldPasswordPlugin
-
- All Implemented Interfaces:
AuthenticationPlugin
public class OldPasswordPlugin extends java.lang.Object implements AuthenticationPlugin
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
OldPasswordPlugin.RandStruct
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
authenticationData
private byte[]
seed
static java.lang.String
TYPE
-
Constructor Summary
Constructors Constructor Description OldPasswordPlugin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private byte[]
cryptOldFormatPassword(java.lang.String password, java.lang.String seed)
private long[]
hashPassword(java.lang.String password)
void
initialize(java.lang.String authenticationData, byte[] seed, Options options)
Plugin initialization.java.lang.String
name()
Authentication plugin name.Buffer
process(PacketOutputStream out, PacketInputStream in, java.util.concurrent.atomic.AtomicInteger sequence)
Process old password plugin authentication.private double
random(OldPasswordPlugin.RandStruct rand)
java.lang.String
type()
Authentication plugin type.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.mariadb.jdbc.authentication.AuthenticationPlugin
mustUseSsl
-
-
-
-
Field Detail
-
TYPE
public static final java.lang.String TYPE
- See Also:
- Constant Field Values
-
authenticationData
private java.lang.String authenticationData
-
seed
private byte[] seed
-
-
Method Detail
-
name
public java.lang.String name()
Description copied from interface:AuthenticationPlugin
Authentication plugin name.- Specified by:
name
in interfaceAuthenticationPlugin
- Returns:
- authentication plugin name. ex: Mysql native password
-
type
public java.lang.String type()
Description copied from interface:AuthenticationPlugin
Authentication plugin type.- Specified by:
type
in interfaceAuthenticationPlugin
- Returns:
- authentication plugin type. ex: mysql_native_password
-
initialize
public void initialize(java.lang.String authenticationData, byte[] seed, Options options)
Description copied from interface:AuthenticationPlugin
Plugin initialization.- Specified by:
initialize
in interfaceAuthenticationPlugin
- Parameters:
authenticationData
- authentication data (password/token)seed
- server provided seedoptions
- Connection string options
-
process
public Buffer process(PacketOutputStream out, PacketInputStream in, java.util.concurrent.atomic.AtomicInteger sequence) throws java.io.IOException
Process old password plugin authentication. see https://mariadb.com/kb/en/library/authentication-plugin-mysql_old_password/- Specified by:
process
in interfaceAuthenticationPlugin
- Parameters:
out
- out streamin
- in streamsequence
- packet sequence- Returns:
- response packet
- Throws:
java.io.IOException
- if socket error
-
cryptOldFormatPassword
private byte[] cryptOldFormatPassword(java.lang.String password, java.lang.String seed)
-
random
private double random(OldPasswordPlugin.RandStruct rand)
-
hashPassword
private long[] hashPassword(java.lang.String password)
-
-