func NewAuthenticationResponse(packet *network.InboundPacket) *AuthenticationResponse { var salt []byte = nil var authData []byte = nil resultRaw := packet.ReadUInt32() result := constants.AuthenticationResult(resultRaw) other := packet.ReadRemaining() if result == constants.AuthenticationResultCryptPassword || result == constants.AuthenticationResultMD5Password { salt = other } if result == constants.AuthenticationResultGSSContinue { authData = other } return &AuthenticationResponse{result, salt, authData} }
func NewBackendKeyResponse(packet *network.InboundPacket) *BackendKeyResponse { pid := packet.ReadUInt32() key := packet.ReadUInt32() return &BackendKeyResponse{pid, key} }