PHP 클래스 Swift_Transport_Esmtp_Auth_NTLMAuthenticator

저자: Ward Peeters ([email protected])
상속: implements Swift_Transport_Esmtp_Authenticator
파일 보기 프로젝트 열기: swiftmailer/swiftmailer

공개 메소드들

메소드 설명
authenticate ( Swift_Transport_SmtpAgent $agent, string $username, string $password ) : boolean Try to authenticate the user with $username and $password.
getAuthKeyword ( ) : string Get the name of the AUTH mechanism this Authenticator handles.

보호된 메소드들

메소드 설명
castToByte ( integer $v ) : integer Cast to byte java equivalent to (byte).
convertTo16bit ( string $input ) : string Convert UTF-8 to UTF-16.
createBlob ( string $timestamp, string $client, string $targetInfo ) : string
createByte ( string $input, integer $bytes = 4, boolean $isHex = true ) : string Right padding with 0 to certain length.
createDesKey ( $key )
createLMPassword ( string $password, string $challenge ) : string Create LMv1 response.
createLMv2Password ( string $password, string $username, string $domain, string $challenge, string $client ) : string Create LMv2 response.
createMessage1 ( ) : string Create our message 1.
createMessage3 ( string $domain, string $username, string $workstation, string $lmResponse, string $ntlmResponse ) : string Create our message 3.
createNTLMPassword ( string $password, string $challenge ) : string Create NTLMv1 response.
createNTLMv2Hash ( string $password, string $username, string $domain, string $challenge, string $targetInfo, string $timestamp, string $client ) : string Create NTLMv2 response.
createSecurityBuffer ( string $value, integer $offset, boolean $is16 = false ) : string Create our security buffer depending on length and offset.
debug ( string $message )
desEncrypt ( string $value, string $key ) : string DES Encryption.
getCorrectTimestamp ( string $time ) : string Convert a normal timestamp to a tenth of a microtime epoch time.
getDomainAndUsername ( string $name ) : array Get domain and username from our username.
getRandomBytes ( $length ) : string Create random bytes.
md4Encrypt ( string $input ) : string MD4 Encryption.
md5Encrypt ( string $key, string $msg ) : string MD5 Encryption.
parseMessage2 ( string $response ) : array Fetch all details of our response (message 2).
readSecurityBuffer ( string $value ) : array Read our security buffer to fetch length and offset of our value.
readSubBlock ( $block ) : array Read the blob information in from message2.
sendMessage1 ( Swift_Transport_SmtpAgent $agent ) : string Send our auth message and returns the response.
sendMessage3 ( string $response, string $username, string $password, string $timestamp, string $client, Swift_Transport_SmtpAgent $agent, boolean $v2 = true ) : string Send our final message with all our data.
si2bin ( $si, $bits = 32 )
uRShift ( integer $a, integer $b ) : integer Java unsigned right bitwise $a >>> $b.

메소드 상세

authenticate() 공개 메소드

Try to authenticate the user with $username and $password.
public authenticate ( Swift_Transport_SmtpAgent $agent, string $username, string $password ) : boolean
$agent Swift_Transport_SmtpAgent
$username string
$password string
리턴 boolean

castToByte() 보호된 메소드

Cast to byte java equivalent to (byte).
protected castToByte ( integer $v ) : integer
$v integer
리턴 integer

convertTo16bit() 보호된 메소드

Convert UTF-8 to UTF-16.
protected convertTo16bit ( string $input ) : string
$input string
리턴 string

createBlob() 보호된 메소드

protected createBlob ( string $timestamp, string $client, string $targetInfo ) : string
$timestamp string Epoch timestamp in microseconds
$client string Random bytes
$targetInfo string
리턴 string

createByte() 보호된 메소드

Right padding with 0 to certain length.
protected createByte ( string $input, integer $bytes = 4, boolean $isHex = true ) : string
$input string
$bytes integer Length of bytes
$isHex boolean Did we provided hex value
리턴 string

createDesKey() 보호된 메소드

protected createDesKey ( $key )

createLMPassword() 보호된 메소드

Create LMv1 response.
protected createLMPassword ( string $password, string $challenge ) : string
$password string
$challenge string
리턴 string

createLMv2Password() 보호된 메소드

Create LMv2 response.
protected createLMv2Password ( string $password, string $username, string $domain, string $challenge, string $client ) : string
$password string
$username string
$domain string
$challenge string NTLM Challenge
$client string Random string
리턴 string

createMessage1() 보호된 메소드

Create our message 1.
protected createMessage1 ( ) : string
리턴 string

createMessage3() 보호된 메소드

Create our message 3.
protected createMessage3 ( string $domain, string $username, string $workstation, string $lmResponse, string $ntlmResponse ) : string
$domain string
$username string
$workstation string
$lmResponse string
$ntlmResponse string
리턴 string

createNTLMPassword() 보호된 메소드

Create NTLMv1 response.
protected createNTLMPassword ( string $password, string $challenge ) : string
$password string
$challenge string
리턴 string

createNTLMv2Hash() 보호된 메소드

Create NTLMv2 response.
또한 보기: http://davenport.sourceforge.net/ntlm.html#theNtlmResponse
protected createNTLMv2Hash ( string $password, string $username, string $domain, string $challenge, string $targetInfo, string $timestamp, string $client ) : string
$password string
$username string
$domain string
$challenge string Hex values
$targetInfo string Hex values
$timestamp string
$client string Random bytes
리턴 string

createSecurityBuffer() 보호된 메소드

Create our security buffer depending on length and offset.
protected createSecurityBuffer ( string $value, integer $offset, boolean $is16 = false ) : string
$value string Value we want to put in
$offset integer start of value
$is16 boolean Do we 16bit string or not?
리턴 string

debug() 보호된 메소드

protected debug ( string $message )
$message string

desEncrypt() 보호된 메소드

DES Encryption.
protected desEncrypt ( string $value, string $key ) : string
$value string An 8-byte string
$key string
리턴 string

getAuthKeyword() 공개 메소드

Get the name of the AUTH mechanism this Authenticator handles.
public getAuthKeyword ( ) : string
리턴 string

getCorrectTimestamp() 보호된 메소드

Convert a normal timestamp to a tenth of a microtime epoch time.
protected getCorrectTimestamp ( string $time ) : string
$time string
리턴 string

getDomainAndUsername() 보호된 메소드

Get domain and username from our username.
protected getDomainAndUsername ( string $name ) : array
$name string
리턴 array

getRandomBytes() 보호된 메소드

Create random bytes.
protected getRandomBytes ( $length ) : string
$length
리턴 string

md4Encrypt() 보호된 메소드

MD4 Encryption.
또한 보기: http://php.net/manual/en/ref.hash.php
protected md4Encrypt ( string $input ) : string
$input string
리턴 string

md5Encrypt() 보호된 메소드

MD5 Encryption.
protected md5Encrypt ( string $key, string $msg ) : string
$key string Encryption key
$msg string Message to encrypt
리턴 string

parseMessage2() 보호된 메소드

Fetch all details of our response (message 2).
protected parseMessage2 ( string $response ) : array
$response string
리턴 array our response parsed

readSecurityBuffer() 보호된 메소드

Read our security buffer to fetch length and offset of our value.
protected readSecurityBuffer ( string $value ) : array
$value string Securitybuffer in hex
리턴 array array with length and offset

readSubBlock() 보호된 메소드

Read the blob information in from message2.
protected readSubBlock ( $block ) : array
$block
리턴 array

sendMessage1() 보호된 메소드

Send our auth message and returns the response.
protected sendMessage1 ( Swift_Transport_SmtpAgent $agent ) : string
$agent Swift_Transport_SmtpAgent
리턴 string SMTP Response

sendMessage3() 보호된 메소드

Send our final message with all our data.
protected sendMessage3 ( string $response, string $username, string $password, string $timestamp, string $client, Swift_Transport_SmtpAgent $agent, boolean $v2 = true ) : string
$response string Message 1 response (message 2)
$username string
$password string
$timestamp string
$client string
$agent Swift_Transport_SmtpAgent
$v2 boolean Use version2 of the protocol
리턴 string

si2bin() 보호된 메소드

protected si2bin ( $si, $bits = 32 )

uRShift() 보호된 메소드

Java unsigned right bitwise $a >>> $b.
protected uRShift ( integer $a, integer $b ) : integer
$a integer
$b integer
리턴 integer