MCPcopy Create free account
hub / github.com/apecloud/myduckserver / MessageWithoutProof

Method MessageWithoutProof

pgserver/authentication_scram.go:369–379  ·  view source on GitHub ↗

MessageWithoutProof returns the client-final-message-without-proof.

()

Source from the content-addressed store, hash-verified

367}
368
369// MessageWithoutProof returns the client-final-message-without-proof.
370func (sr SASLResponse) MessageWithoutProof() []byte {
371 // client-final-message is defined as:
372 // client-final-message-without-proof "," proof
373 // So we can simply search for ",p=" and exclude everything after that for well-conforming messages.
374 // If the message does not conform, then an error will happen later in the pipeline.
375 index := strings.LastIndex(string(sr.RawData), ",p=")
376 if index == -1 {
377 return sr.RawData
378 }
379 return sr.RawData[:index]
380}

Callers 1

verifySASLClientProofFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected