MCPcopy Create free account
hub / github.com/IceFireDB/IceFireDB / WriteEncryptedPassword

Method WriteEncryptedPassword

IceFireDB-SQLite/pkg/mysql/packet/conn.go:271–277  ·  view source on GitHub ↗
(password string, seed []byte, pub *rsa.PublicKey)

Source from the content-addressed store, hash-verified

269}
270
271func (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
280func (c *Conn) WriteAuthSwitchPacket(authData []byte, addNUL bool) error {

Callers 1

handleAuthResultMethod · 0.95

Calls 2

WriteAuthSwitchPacketMethod · 0.95
EncryptPasswordFunction · 0.50

Tested by

no test coverage detected