Geeklog
[ class tree: Geeklog ] [ index: Geeklog ] [ all elements ]

Class: Swift_Transport_Esmtp_Auth_NTLMAuthenticator

Source Location: /system/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/NTLMAuthenticator.php

Class Overview


Handles NTLM authentication.


Author(s):

Implements interfaces:

Constants

Methods



Class Details

[line 18]
Handles NTLM authentication.



Tags:

author:  Ward Peeters <ward@coding-tech.com>


[ Top ]


Class Methods


method authenticate [line 42]

bool authenticate( Swift_Transport_SmtpAgent $agent, string $username, string $password)

Try to authenticate the user with $username and $password.



Tags:

access:  public



Implementation of:
Swift_Transport_Esmtp_Authenticator::authenticate()
Try to authenticate the user with $username and $password.

Parameters:

Swift_Transport_SmtpAgent   $agent  
string   $username  
string   $password  

[ Top ]

method castToByte [line 502]

int castToByte( int $v)

Cast to byte java equivalent to (byte).



Tags:

access:  protected


Parameters:

int   $v  

[ Top ]

method convertTo16bit [line 623]

string convertTo16bit( string $input)

Convert UTF-8 to UTF-16.



Tags:

access:  protected


Parameters:

string   $input  

[ Top ]

method createBlob [line 273]

string createBlob( string $timestamp, string $client, string $targetInfo)



Tags:

access:  protected


Parameters:

string   $timestamp   Epoch timestamp in microseconds
string   $client   Random bytes
string   $targetInfo  

[ Top ]

method createByte [line 534]

string createByte( string $input, [int $bytes = 4], [bool $isHex = true])

Right padding with 0 to certain length.



Tags:

access:  protected


Parameters:

string   $input  
int   $bytes   Length of bytes
bool   $isHex   Did we provided hex value

[ Top ]

method createDesKey [line 432]

void createDesKey( $key)



Tags:

access:  protected


Parameters:

   $key  

[ Top ]

method createLMPassword [line 312]

string createLMPassword( string $password, string $challenge)

Create LMv1 response.



Tags:

access:  protected


Parameters:

string   $password  
string   $challenge  

[ Top ]

method createLMv2Password [line 390]

string createLMv2Password( string $password, string $username, string $domain, string $challenge, string $client)

Create LMv2 response.



Tags:

access:  protected


Parameters:

string   $password  
string   $username  
string   $domain  
string   $challenge   NTLM Challenge
string   $client   Random string

[ Top ]

method createMessage1 [line 219]

string createMessage1( )

Create our message 1.



Tags:

access:  protected


[ Top ]

method createMessage3 [line 237]

string createMessage3( string $domain, string $username, string $workstation, string $lmResponse, string $ntlmResponse)

Create our message 3.



Tags:

access:  protected


Parameters:

string   $domain  
string   $username  
string   $workstation  
string   $lmResponse  
string   $ntlmResponse  

[ Top ]

method createNTLMPassword [line 341]

string createNTLMPassword( string $password, string $challenge)

Create NTLMv1 response.



Tags:

access:  protected


Parameters:

string   $password  
string   $challenge  

[ Top ]

method createNTLMv2Hash [line 419]

string createNTLMv2Hash( string $password, string $username, string $domain, string $challenge, string $targetInfo, string $timestamp, string $client)

Create NTLMv2 response.



Tags:

see:  theNtlmResponse
access:  protected


Parameters:

string   $password  
string   $username  
string   $domain  
string   $challenge   Hex values
string   $targetInfo   Hex values
string   $timestamp  
string   $client   Random bytes

[ Top ]

method createSecurityBuffer [line 471]

string createSecurityBuffer( string $value, int $offset, [bool $is16 = false])

Create our security buffer depending on length and offset.



Tags:

access:  protected


Parameters:

string   $value   Value we want to put in
int   $offset   start of value
bool   $is16   Do we 16bit string or not?

[ Top ]

method debug [line 647]

void debug( string $message)



Tags:

access:  protected


Parameters:

string   $message  

[ Top ]

method desEncrypt [line 572]

string desEncrypt( string $value, string $key)

DES Encryption.



Tags:

access:  protected


Parameters:

string   $value   An 8-byte string
string   $key  

[ Top ]

method getAuthKeyword [line 28]

string getAuthKeyword( )

Get the name of the AUTH mechanism this Authenticator handles.



Tags:

access:  public



Implementation of:
Swift_Transport_Esmtp_Authenticator::getAuthKeyword()
Get the name of the AUTH mechanism this Authenticator handles.
[ Top ]

method getCorrectTimestamp [line 361]

string getCorrectTimestamp( string $time)

Convert a normal timestamp to a tenth of a microtime epoch time.



Tags:

access:  protected


Parameters:

string   $time  

[ Top ]

method getDomainAndUsername [line 293]

array getDomainAndUsername( string $name)

Get domain and username from our username.



Tags:

access:  protected
example:  example not found


Parameters:

string   $name  

[ Top ]

method getRandomBytes [line 552]

string getRandomBytes( $length $length)

Create random bytes.



Tags:

access:  protected


Parameters:

$length   $length  

[ Top ]

method hex2bin [line 635]

string hex2bin( string $hex)

Hex2bin replacement for < PHP 5.4.



Tags:

return:  Binary
access:  protected


Parameters:

string   $hex  

[ Top ]

method md4Encrypt [line 609]

string md4Encrypt( string $input)

MD4 Encryption.



Tags:

see:  http://php.net/manual/en/ref.hash.php
access:  protected


Parameters:

string   $input  

[ Top ]

method md5Encrypt [line 586]

string md5Encrypt( string $key, string $msg)

MD5 Encryption.



Tags:

access:  protected


Parameters:

string   $key   Encryption key
string   $msg   Message to encrypt

[ Top ]

method parseMessage2 [line 119]

array parseMessage2( string $response)

Fetch all details of our response (message 2).



Tags:

return:  our response parsed
access:  protected


Parameters:

string   $response  

[ Top ]

method readSecurityBuffer [line 487]

array readSecurityBuffer( string $value)

Read our security buffer to fetch length and offset of our value.



Tags:

return:  array with length and offset
access:  protected


Parameters:

string   $value   Securitybuffer in hex

[ Top ]

method readSubBlock [line 153]

array readSubBlock( $block $block)

Read the blob information in from message2.



Tags:

access:  protected


Parameters:

$block   $block  

[ Top ]

method sendMessage1 [line 105]

string sendMessage1( Swift_Transport_SmtpAgent $agent)

Send our auth message and returns the response.



Tags:

return:  SMTP Response
access:  protected


Parameters:

Swift_Transport_SmtpAgent   $agent  

[ Top ]

method sendMessage3 [line 191]

string sendMessage3( string $response, string $username, string $password, string $timestamp, string $client, Swift_Transport_SmtpAgent $agent, [bool $v2 = true])

Send our final message with all our data.



Tags:

access:  protected


Parameters:

string   $response   Message 1 response (message 2)
string   $username  
string   $password  
string   $timestamp  
string   $client  
Swift_Transport_SmtpAgent   $agent  
bool   $v2   Use version2 of the protocol

[ Top ]

method si2bin [line 72]

void si2bin( $si, [ $bits = 32])



Tags:

access:  protected


Parameters:

   $si  
   $bits  

[ Top ]

method uRShift [line 516]

int uRShift( int $a, int $b)

Java unsigned right bitwise $a >>> $b.



Tags:

access:  protected


Parameters:

int   $a  
int   $b  

[ Top ]


Class Constants

DESCONST =  'KGS!@#$%'

[line 21]


[ Top ]

NTLMSIG =  "NTLMSSP\x00"

[line 20]


[ Top ]



Documentation generated on Sun, 02 Oct 2016 07:52:53 +0000 by phpDocumentor 1.4.3