Class Ed25519PasswordPlugin

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String authenticationData  
      private byte[] seed  
    • Constructor Summary

      Constructors 
      Constructor Description
      Ed25519PasswordPlugin​(java.lang.String authenticationData, byte[] seed)  
    • Field Detail

      • authenticationData

        private final java.lang.String authenticationData
      • seed

        private final byte[] seed
    • Constructor Detail

      • Ed25519PasswordPlugin

        public Ed25519PasswordPlugin​(java.lang.String authenticationData,
                                     byte[] seed)
    • Method Detail

      • ed25519SignWithPassword

        private static byte[] ed25519SignWithPassword​(java.lang.String password,
                                                      byte[] seed)
        Sign the server seed with the password. This is an RFC 8032 signature where the raw password takes the place of the 32-byte secret seed.
        Parameters:
        password - password
        seed - server seed
        Returns:
        64-byte signature
      • process

        public ReadableByteBuf process​(Writer out,
                                       Reader in,
                                       Context context,
                                       boolean sslFingerPrintValidation)
                                throws java.sql.SQLException,
                                       java.io.IOException
        Process Ed25519 password plugin authentication. see authentication-plugin-ed25519
        Specified by:
        process in interface AuthenticationPlugin
        Parameters:
        out - out stream
        in - in stream
        context - connection context
        sslFingerPrintValidation - true if SSL certificate fingerprint validation is enabled
        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