Class Ed25519PasswordPlugin
- java.lang.Object
-
- org.mariadb.jdbc.internal.com.send.authentication.Ed25519PasswordPlugin
-
- All Implemented Interfaces:
AuthenticationPlugin
public class Ed25519PasswordPlugin extends java.lang.Object implements AuthenticationPlugin
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
authenticationData
private java.lang.String
passwordCharacterEncoding
private byte[]
seed
-
Constructor Summary
Constructors Constructor Description Ed25519PasswordPlugin()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static byte[]
ed25519SignWithPassword(java.lang.String password, byte[] seed, java.lang.String passwordCharacterEncoding)
void
initialize(java.lang.String authenticationData, byte[] seed, Options options)
Initialization.java.lang.String
name()
Authentication plugin name.Buffer
process(PacketOutputStream out, PacketInputStream in, java.util.concurrent.atomic.AtomicInteger sequence)
Process Ed25519 password plugin authentication.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
-
-
-
-
Method Detail
-
ed25519SignWithPassword
private static byte[] ed25519SignWithPassword(java.lang.String password, byte[] seed, java.lang.String passwordCharacterEncoding) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
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)
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, java.sql.SQLException
Process Ed25519 password plugin authentication. see https://mariadb.com/kb/en/library/authentication-plugin-ed25519/- Specified by:
process
in interfaceAuthenticationPlugin
- Parameters:
out
- out streamin
- in streamsequence
- packet sequence- Returns:
- response packet
- Throws:
java.io.IOException
- if socket errorjava.sql.SQLException
- if plugin exception
-
-