string Crypt_CHAP_MSCHAPv1::ntPasswordHash (
string $password = ''
)
このメソッドは、指定した平文パスワードあるいはパスワードプロパティから LAN-Manager ハッシュを作成します。NT ハッシュは md4(str2unicode(plaintext)) のようにして計算します。
string $password
- ハッシュするパスワード。
string
- NT ハッシュを文字列で返します。
This function can not be called statically.
Crypt_CHAP_MSCHAPv1::ntPasswordHash() の使用
<?php
require_once 'Crypt/CHAP.php';
$cr = new Crypt_CHAP_MSCHAPv1();
$cr->password = 'MyPw';
echo bin2hex($cr->ntPasswordHash());
// あるいは
echo bin2hex($cr->ntPasswordHash('MySecret'));
?>