(password string, seed []byte, pub *rsa.PublicKey)
| 269 | } |
| 270 | |
| 271 | func (c *Conn) WriteEncryptedPassword(password string, seed []byte, pub *rsa.PublicKey) error { |
| 272 | enc, err := EncryptPassword(password, seed, pub) |
| 273 | if err != nil { |
| 274 | return errors.Wrap(err, "EncryptPassword failed") |
| 275 | } |
| 276 | return errors.Wrap(c.WriteAuthSwitchPacket(enc, false), "WriteAuthSwitchPacket failed") |
| 277 | } |
| 278 | |
| 279 | // http://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::AuthSwitchResponse |
| 280 | func (c *Conn) WriteAuthSwitchPacket(authData []byte, addNUL bool) error { |
no test coverage detected