[ class tree: Auth_SASL ] [ index: Auth_SASL ] [ all elements ]

Class: Auth_SASL_SCRAM

Source Location: /Auth_SASL-1.0.6/Auth/SASL/SCRAM.php

Class Overview


Common functionality to SASL mechanisms



  • 1.0


Inherited Variables

Inherited Methods

Class: Auth_SASL_Common

Function which implements HMAC-SHA-1 digest

Class Details

[line 51]
Common functionality to SASL mechanisms

[ Top ]

Method Detail

__construct (Constructor)   [line 63]

Auth_SASL_SCRAM __construct( string $hash)

Construct a SCRAM-H client where 'H' is a cryptographic hash function.


string   $hash   —  The name cryptographic hash function 'H' as registered by IANA in the "Hash Function Textual Names" registry.

[ Top ]

getResponse   [line 110]

string|false getResponse( string $authcid, string $pass, [string $challenge = NULL], [string $authzid = NULL])

Provides the (main) client response for SCRAM-H.
  • Return: The response (binary, NOT base64 encoded)
  • Access: public


string   $authcid   —  Authentication id (username)
string   $pass   —  Password
string   $challenge   —  The challenge sent by the server. If the challenge is NULL or an empty string, the result will be the "initial response".
string   $authzid   —  Authorization id (username to proxy as)

[ Top ]

processOutcome   [line 238]

bool processOutcome( string $data)

SCRAM has also a server verification step. On a successful outcome, it will send additional data which must absolutely be checked against this function. If this fails, the entity which we are communicating with is probably not the server as it has not access to your ServerKey.
  • Return: Whether the server has been authenticated. If false, the client must close the connection and consider to be under a MITM attack.
  • Access: public


string   $data   —  The additional data sent along a successful outcome.

[ Top ]

Documentation generated on Mon, 11 Mar 2019 15:44:57 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.