Crypt_CHAP_MSCHAPv2::challengeHash()

Crypt_CHAP_MSCHAPv2::challengeHash() – チャレンジ-ハッシュを作成する

Synopsis

string Crypt_CHAP_MSCHAPv2::challengeHash ( )

Description

このメソッドは、(SHA1) チャレンジ-ハッシュを作成します。 このハッシュには、認証符号やピアチャレンジ、そしてユーザ名が含まれます。

Return value

string - チャレンジ-ハッシュを文字列で返します。

Note

This function can not be called statically.

Example

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());

?>