46 $challenge = $agent->
executeCommand(
"AUTH CRAM-MD5\r\n", array(334));
47 $challenge = base64_decode(substr($challenge, 4));
48 $message = base64_encode(
49 $username .
' ' . $this->
_getResponse($password, $challenge)
69 if (strlen($secret) > 64)
71 $secret = pack(
'H32', md5($secret));
74 if (strlen($secret) < 64)
76 $secret = str_pad($secret, 64, chr(0));
79 $k_ipad = substr($secret, 0, 64) ^ str_repeat(chr(0x36), 64);
80 $k_opad = substr($secret, 0, 64) ^ str_repeat(chr(0x5C), 64);
82 $inner = pack(
'H32', md5($k_ipad . $challenge));
83 $digest = md5($k_opad . $inner);