Class AuthenticateSecurityPasswordCommand

java.lang.Object
com.github.shyiko.mysql.binlog.network.protocol.command.AuthenticateSecurityPasswordCommand
All Implemented Interfaces:
Command, Packet

public class AuthenticateSecurityPasswordCommand extends Object implements Command
Author:
Stanley Shyiko
  • Constructor Details

    • AuthenticateSecurityPasswordCommand

      public AuthenticateSecurityPasswordCommand(String schema, String username, String password, String salt, int collation)
  • Method Details

    • setClientCapabilities

      public void setClientCapabilities(int clientCapabilities)
    • setCollation

      public void setCollation(int collation)
    • toByteArray

      public byte[] toByteArray() throws IOException
      Specified by:
      toByteArray in interface Command
      Throws:
      IOException
    • passwordCompatibleWithMySQL411

      public static byte[] passwordCompatibleWithMySQL411(String password, String salt)
      see mysql/sql/password.c scramble(...)
      Parameters:
      password - the password
      salt - salt received from server
      Returns:
      hashed password