Class Ed25519PasswordPlugin
java.lang.Object
org.mariadb.jdbc.plugin.authentication.standard.Ed25519PasswordPlugin
- All Implemented Interfaces:
AuthenticationPlugin
ED25519 password plugin
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static byte[]ed25519SignWithPassword(String password, byte[] seed) Sign passwordbyte[]hash(Credential credential) Return Hashvoidinitialize(String authenticationData, byte[] seed, Configuration conf) Initialization.booleanCan plugins is MitM-proof, permitting returning HASHProcess Ed25519 password plugin authentication.type()Authentication plugin type.
-
Field Details
-
authenticationData
-
seed
private byte[] seed
-
-
Constructor Details
-
Ed25519PasswordPlugin
public Ed25519PasswordPlugin()
-
-
Method Details
-
ed25519SignWithPassword
Sign password- Parameters:
password- passwordseed- server seed- Returns:
- encrypted value
- Throws:
SQLException- if any error occurs
-
type
Description copied from interface:AuthenticationPluginAuthentication plugin type.- Specified by:
typein interfaceAuthenticationPlugin- Returns:
- authentication plugin type. ex: mysql_native_password
-
initialize
Initialization.- Specified by:
initializein interfaceAuthenticationPlugin- Parameters:
authenticationData- authentication data (password/token)seed- server provided seedconf- Connection string options
-
process
public ReadableByteBuf process(Writer out, Reader in, Context context) throws SQLException, IOException Process Ed25519 password plugin authentication. see https://mariadb.com/kb/en/library/authentication-plugin-ed25519/- Specified by:
processin interfaceAuthenticationPlugin- Parameters:
out- out streamin- in streamcontext- connection context- Returns:
- response packet
- Throws:
IOException- if socket errorSQLException- if plugin exception
-
isMitMProof
public boolean isMitMProof()Description copied from interface:AuthenticationPluginCan plugins is MitM-proof, permitting returning HASH- Specified by:
isMitMProofin interfaceAuthenticationPlugin- Returns:
- true if permitted
-
hash
Return Hash- Specified by:
hashin interfaceAuthenticationPlugin- Parameters:
credential- Credential- Returns:
- hash
-