string Crypt_CHAP_MSCHAPv2::challengeHash ()
string Crypt_CHAP_MSCHAPv2::challengeHash
This method generates the (SHA1) Challenge-Hash containing the authenticator and the peer challenge and the username.
string - a String containing the Challenge-Hash
This function can not be called statically.
Example 28-1. Using Crypt_CHAP_MSCHAPv2::challengeHash()
<?php require_once 'Crypt/CHAP.php'; $cr = new Crypt_CHAP_MSCHAPv2(); $cr->username = 'billy'; $cr->peerChallenge = $peerChallenge; $cr->authChallenge = $authChallenge; echo bin2hex($cr->challengeHash()); ?>