Class Sha256PasswordPlugin

    • Constructor Detail

      • Sha256PasswordPlugin

        public Sha256PasswordPlugin()
    • Method Detail

      • readPublicKeyFromFile

        public static PublicKey readPublicKeyFromFile​(String serverRsaPublicKeyFile)
                                               throws SQLException
        Read public Key from file.
        Parameters:
        serverRsaPublicKeyFile - RSA public key file
        Returns:
        public key
        Throws:
        SQLException - if cannot read file or file content is not a public key.
      • generatePublicKey

        public static PublicKey generatePublicKey​(byte[] publicKeyBytes)
                                           throws SQLException
        Read public pem key from String.
        Parameters:
        publicKeyBytes - public key bytes value
        Returns:
        public key
        Throws:
        SQLException - if key cannot be parsed
      • initialize

        public void initialize​(String authenticationData,
                               byte[] seed,
                               Options options)
        Initialization.
        Specified by:
        initialize in interface AuthenticationPlugin
        Parameters:
        authenticationData - authentication data (password/token)
        seed - server provided seed
        options - Connection string options