MessageWithoutProof returns the client-final-message-without-proof.
()
| 367 | } |
| 368 | |
| 369 | // MessageWithoutProof returns the client-final-message-without-proof. |
| 370 | func (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 | } |
no outgoing calls
no test coverage detected