TYPO3
7.6
|
Public Member Functions | |
getAuthKeyword () | |
authenticate (Swift_Transport_SmtpAgent $agent, $username, $password) | |
Public Attributes | |
const | NTLMSIG = "NTLMSSP\x00" |
const | DESCONST = 'KGS!@#$%' |
Protected Member Functions | |
si2bin ($si, $bits=32) | |
sendMessage1 (Swift_Transport_SmtpAgent $agent) | |
parseMessage2 ($response) | |
readSubBlock ($block) | |
sendMessage3 ($response, $username, $password, $timestamp, $client, Swift_Transport_SmtpAgent $agent, $v2=true) | |
createMessage1 () | |
createMessage3 ($domain, $username, $workstation, $lmResponse, $ntlmResponse) | |
createBlob ($timestamp, $client, $targetInfo) | |
getDomainAndUsername ($name) | |
createLMPassword ($password, $challenge) | |
createNTLMPassword ($password, $challenge) | |
getCorrectTimestamp ($time) | |
createLMv2Password ($password, $username, $domain, $challenge, $client) | |
createNTLMv2Hash ($password, $username, $domain, $challenge, $targetInfo, $timestamp, $client) | |
createDesKey ($key) | |
createSecurityBuffer ($value, $offset, $is16=false) | |
readSecurityBuffer ($value) | |
castToByte ($v) | |
uRShift ($a, $b) | |
createByte ($input, $bytes=4, $isHex=true) | |
getRandomBytes ($length) | |
desEncrypt ($value, $key) | |
md5Encrypt ($key, $msg) | |
md4Encrypt ($input) | |
convertTo16bit ($input) | |
hex2bin ($hex) | |
debug ($message) | |
Handles NTLM authentication.
Definition at line 18 of file NTLMAuthenticator.php.
authenticate | ( | Swift_Transport_SmtpAgent | $agent, |
$username, | |||
$password | |||
) |
Try to authenticate the user with $username and $password.
Swift_Transport_SmtpAgent | $agent | |
string | $username | |
string | $password |
Implements Swift_Transport_Esmtp_Authenticator.
Definition at line 42 of file NTLMAuthenticator.php.
References $response, Swift_Transport_SmtpAgent\executeCommand(), getCorrectTimestamp(), getRandomBytes(), sendMessage1(), and sendMessage3().
|
protected |
Cast to byte java equivalent to (byte).
int | $v |
Definition at line 506 of file NTLMAuthenticator.php.
Referenced by createDesKey().
|
protected |
Convert UTF-8 to UTF-16.
string | $input |
Definition at line 629 of file NTLMAuthenticator.php.
Referenced by createLMv2Password(), createNTLMv2Hash(), and md4Encrypt().
|
protected |
string | $timestamp | Epoch timestamp in microseconds |
string | $client | Random bytes |
string | $targetInfo |
Definition at line 277 of file NTLMAuthenticator.php.
References createByte().
Referenced by createNTLMv2Hash().
|
protected |
Right padding with 0 to certain length.
string | $input | |
int | $bytes | Length of bytes |
bool | $isHex | Did we provided hex value |
Definition at line 538 of file NTLMAuthenticator.php.
References hex2bin().
Referenced by createBlob(), createLMPassword(), createLMv2Password(), createNTLMPassword(), createSecurityBuffer(), and readSubBlock().
|
protected |
Definition at line 436 of file NTLMAuthenticator.php.
References castToByte(), hex2bin(), and uRShift().
Referenced by createLMPassword(), and createNTLMPassword().
|
protected |
Create LMv1 response.
string | $password | |
string | $challenge |
Definition at line 316 of file NTLMAuthenticator.php.
References createByte(), createDesKey(), and desEncrypt().
Referenced by sendMessage3().
|
protected |
Create LMv2 response.
string | $password | |
string | $username | |
string | $domain | |
string | $challenge | NTLM Challenge |
string | $client | Random string |
Definition at line 394 of file NTLMAuthenticator.php.
References convertTo16bit(), createByte(), md4Encrypt(), and md5Encrypt().
Referenced by sendMessage3().
|
protected |
Create our message 1.
Definition at line 223 of file NTLMAuthenticator.php.
Referenced by sendMessage1().
|
protected |
Create our message 3.
string | $domain | |
string | $username | |
string | $workstation | |
string | $lmResponse | |
string | $ntlmResponse |
Definition at line 241 of file NTLMAuthenticator.php.
References createSecurityBuffer(), and readSecurityBuffer().
Referenced by sendMessage3().
|
protected |
Create NTLMv1 response.
string | $password | |
string | $challenge |
Definition at line 345 of file NTLMAuthenticator.php.
References createByte(), createDesKey(), desEncrypt(), and md4Encrypt().
Referenced by sendMessage3().
|
protected |
Create NTLMv2 response.
string | $password | |
string | $username | |
string | $domain | |
string | $challenge | Hex values |
string | $targetInfo | Hex values |
string | $timestamp | |
string | $client | Random bytes |
Definition at line 423 of file NTLMAuthenticator.php.
References convertTo16bit(), createBlob(), md4Encrypt(), and md5Encrypt().
Referenced by sendMessage3().
|
protected |
HELPER FUNCTIONS Create our security buffer depending on length and offset.
string | $value | Value we want to put in |
int | $offset | start of value |
bool | $is16 | Do we 16bit string or not? |
Definition at line 475 of file NTLMAuthenticator.php.
References createByte().
Referenced by createMessage3().
|
protected |
string | $message |
Definition at line 653 of file NTLMAuthenticator.php.
References elseif, hex2bin(), parseMessage2(), and readSecurityBuffer().
|
protected |
ENCRYPTION ALGORITHMS DES Encryption.
string | $value | |
string | $key |
Definition at line 576 of file NTLMAuthenticator.php.
Referenced by createLMPassword(), and createNTLMPassword().
getAuthKeyword | ( | ) |
Get the name of the AUTH mechanism this Authenticator handles.
Implements Swift_Transport_Esmtp_Authenticator.
Definition at line 28 of file NTLMAuthenticator.php.
Referenced by sendMessage1().
|
protected |
Convert a normal timestamp to a tenth of a microtime epoch time.
string | $time |
Definition at line 365 of file NTLMAuthenticator.php.
References si2bin().
Referenced by authenticate().
|
protected |
Definition at line 297 of file NTLMAuthenticator.php.
Referenced by sendMessage3().
|
protected |
Create random bytes.
$length |
Definition at line 556 of file NTLMAuthenticator.php.
Referenced by authenticate().
|
protected |
Hex2bin replacement for < PHP 5.4.
string | $hex |
Definition at line 641 of file NTLMAuthenticator.php.
Referenced by createByte(), createDesKey(), debug(), md4Encrypt(), parseMessage2(), and readSubBlock().
|
protected |
MD4 Encryption.
string | $input |
Definition at line 615 of file NTLMAuthenticator.php.
References convertTo16bit(), and hex2bin().
Referenced by createLMv2Password(), createNTLMPassword(), and createNTLMv2Hash().
|
protected |
MD5 Encryption.
string | $key | Encryption key |
string | $msg | Message to encrypt |
Definition at line 592 of file NTLMAuthenticator.php.
Referenced by createLMv2Password(), and createNTLMv2Hash().
|
protected |
Fetch all details of our response (message 2).
string | $response |
Definition at line 123 of file NTLMAuthenticator.php.
References $response, hex2bin(), and readSubBlock().
Referenced by debug(), and sendMessage3().
|
protected |
Read our security buffer to fetch length and offset of our value.
string | $value | Securitybuffer in hex |
Definition at line 491 of file NTLMAuthenticator.php.
Referenced by createMessage3(), and debug().
|
protected |
Read the blob information in from message2.
$block |
Definition at line 157 of file NTLMAuthenticator.php.
References createByte(), and hex2bin().
Referenced by parseMessage2().
|
protected |
Send our auth message and returns the response.
Swift_Transport_SmtpAgent | $agent |
Definition at line 109 of file NTLMAuthenticator.php.
References createMessage1(), Swift_Transport_SmtpAgent\executeCommand(), and getAuthKeyword().
Referenced by authenticate().
|
protected |
Send our final message with all our data.
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 |
Definition at line 195 of file NTLMAuthenticator.php.
References $response, createLMPassword(), createLMv2Password(), createMessage3(), createNTLMPassword(), createNTLMv2Hash(), Swift_Transport_SmtpAgent\executeCommand(), getDomainAndUsername(), and parseMessage2().
Referenced by authenticate().
|
protected |
Definition at line 76 of file NTLMAuthenticator.php.
Referenced by getCorrectTimestamp().
|
protected |
Java unsigned right bitwise $a >>> $b.
int | $a | |
int | $b |
Definition at line 520 of file NTLMAuthenticator.php.
Referenced by createDesKey().
const DESCONST = 'KGS!@#$%' |
Definition at line 21 of file NTLMAuthenticator.php.
const NTLMSIG = "NTLMSSP\x00" |
Definition at line 20 of file NTLMAuthenticator.php.