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

Class: Auth_SASL2_SCRAM

Source Location: /Auth_SASL2-0.1.0/Auth/SASL2/SCRAM.php

Class Overview

Auth_SASL2_Common
   |
   --Auth_SASL2_SCRAM

Common functionality to SASL mechanisms


Author(s):

Version:

  • 1.0

Methods


Inherited Variables

Inherited Methods

Class: Auth_SASL2_Common

Auth_SASL2_Common::_HMAC_SHA1()
Function which implements HMAC-SHA-1 digest

Class Details

[line 51]
Common functionality to SASL mechanisms


[ Top ]


Method Detail

__construct (Constructor)   [line 64]

Auth_SASL2_SCRAM __construct( string $hash)

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

Parameters:

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

[ Top ]

getResponse   [line 112]

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

Parameters:

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 240]

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

Parameters:

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

[ Top ]


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