Class Ed25519PasswordPlugin

    • Field Detail

      • authenticationData

        private java.lang.String authenticationData
      • seed

        private byte[] seed
    • Constructor Detail

      • Ed25519PasswordPlugin

        public Ed25519PasswordPlugin()
    • Method Detail

      • ed25519SignWithPassword

        private static byte[] ed25519SignWithPassword​(java.lang.String password,
                                                      byte[] seed)
                                               throws java.sql.SQLException
        Sign password
        Parameters:
        password - password
        seed - server seed
        Returns:
        encrypted value
        Throws:
        java.sql.SQLException - if any error occurs
      • type

        public java.lang.String type()
        Description copied from interface: AuthenticationPlugin
        Authentication plugin type.
        Specified by:
        type in interface AuthenticationPlugin
        Returns:
        authentication plugin type. ex: mysql_native_password
      • initialize

        public void initialize​(java.lang.String authenticationData,
                               byte[] seed,
                               Configuration conf,
                               HostAddress hostAddress)
        Initialization.
        Specified by:
        initialize in interface AuthenticationPlugin
        Parameters:
        authenticationData - authentication data (password/token)
        seed - server provided seed
        conf - Connection string options
        hostAddress - host information
      • process

        public ReadableByteBuf process​(Writer out,
                                       Reader in,
                                       Context context)
                                throws java.sql.SQLException,
                                       java.io.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:
        java.io.IOException - if socket error
        java.sql.SQLException - if plugin exception
      • hash

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