Class Ed25519PasswordPlugin

java.lang.Object
org.mariadb.jdbc.plugin.authentication.standard.Ed25519PasswordPlugin
All Implemented Interfaces:
AuthenticationPlugin

public class Ed25519PasswordPlugin extends Object implements AuthenticationPlugin
ED25519 password plugin
  • Field Details

    • authenticationData

      private String authenticationData
    • seed

      private byte[] seed
  • Constructor Details

  • Method Details

    • ed25519SignWithPassword

      private static byte[] ed25519SignWithPassword(String password, byte[] seed) throws SQLException
      Sign password
      Parameters:
      password - password
      seed - server seed
      Returns:
      encrypted value
      Throws:
      SQLException - if any error occurs
    • 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:
      process in interface AuthenticationPlugin
      Parameters:
      out - out stream
      in - in stream
      context - connection context
      Returns:
      response packet
      Throws:
      IOException - if socket error
      SQLException - if plugin exception
    • isMitMProof

      public boolean isMitMProof()
      Description copied from interface: AuthenticationPlugin
      Can plugins is MitM-proof, permitting returning HASH
      Specified by:
      isMitMProof in interface AuthenticationPlugin
      Returns:
      true if permitted
    • hash

      public byte[] hash(Credential credential)
      Return Hash
      Specified by:
      hash in interface AuthenticationPlugin
      Parameters:
      credential - Credential
      Returns:
      hash