package pgproto3

import (
	
	

	
)
AuthenticationSASLContinue is a message sent from the backend containing a SASL challenge.
Backend identifies this message as sendable by the PostgreSQL backend.
Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message type identifier and 4 byte message length.
func ( *AuthenticationSASLContinue) ( []byte) error {
	if len() < 4 {
		return errors.New("authentication message too short")
	}

	 := binary.BigEndian.Uint32()

	if  != AuthTypeSASLContinue {
		return errors.New("bad auth type")
	}

	.Data = [4:]

	return nil
}
Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
func ( *AuthenticationSASLContinue) ( []byte) []byte {
	 = append(, 'R')
	 := len()
	 = pgio.AppendInt32(, -1)
	 = pgio.AppendUint32(, AuthTypeSASLContinue)

	 = append(, .Data...)

	pgio.SetInt32([:], int32(len([:])))

	return