Crypt_CHAP_MSCHAPv1::lmPasswordHash()

Crypt_CHAP_MSCHAPv1::lmPasswordHash() -- Generates the LAN-Manager-Hash from the given plaintext-password.

概要

string Crypt_CHAP_MSCHAPv1::lmPasswordHash ([string $password = ''])

説明

This method generates LAN-Manager-Hash from the given plaintext-password or from the password property.

パラメータ

返り値

string - a String containing the LAN-Manager-Hash

注意

この関数は、スタティックにコールする ことはできません。

LAN-Manager Hash are weak and should not be used anymore.

例 35-1Using Crypt_CHAP_MSCHAPv1::lmPasswordHash()


<?php
require_once 'Crypt/CHAP.php';

$cr = new Crypt_CHAP_MSCHAPv1();
$cr->password = 'MyPw';
echo bin2hex($cr->lmPasswordHash());

// or
echo bin2hex($cr->lmPasswordHash('MySecret'));

?>