Lines Matching refs:received
69 public function challenge(?string $received = null, array $options = []): SaslContext
73 $received = $received === null ? null : $this->encoder->decode($received, $this->context);
75 $response = $this->generateServerResponse($received, $options);
77 $response = $this->generateClientResponse($received, $options);
97 throw new SaslException('The rspauth value was received before the response was generated.');
112 protected function generateServerResponse(?Message $received, array $options): ?string
114 if ($received === null) {
117 $response = $this->generateServerVerification($received, $options);
193 protected function generateServerVerification(Message $received, array $options): ?Message
204 $qop = $received->get('qop');
205 $cipher = $received->get('cipher');
218 if (strlen((string) $received->get('cnonce')) < 12) {
222 if ($received->get('nonce') !== $this->challenge->get('nonce')) {
226 # Generate our own response to compare against what we received from the client. If they do not match,
228 $expected = DigestMD5Mechanism::computeResponse($password, $this->challenge, $received);
229 if ($expected !== $received->get('response')) {
233 $response = DigestMD5Mechanism::computeResponse($password, $this->challenge, $received, true);
237 $this->context->set('a1', hex2bin(DigestMD5Mechanism::computeA1($password, $this->challenge, $received)));
238 $this->context->set('cipher', $received->get('cipher'));