From 07f5140771388c9e0c8a99b0dd2e5d950bdb173b Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Thu, 14 Oct 2021 15:16:42 +1100 Subject: moving h-source subdir out. --- .../Transport/Esmtp/Auth/CramMd5Authenticator.php | 88 ---------------------- .../Transport/Esmtp/Auth/LoginAuthenticator.php | 58 -------------- .../Transport/Esmtp/Auth/PlainAuthenticator.php | 57 -------------- 3 files changed, 203 deletions(-) delete mode 100755 h-source/External/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/CramMd5Authenticator.php delete mode 100755 h-source/External/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/LoginAuthenticator.php delete mode 100755 h-source/External/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/PlainAuthenticator.php (limited to 'h-source/External/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth') diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/CramMd5Authenticator.php b/h-source/External/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/CramMd5Authenticator.php deleted file mode 100755 index 4c7e0f2..0000000 --- a/h-source/External/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/CramMd5Authenticator.php +++ /dev/null @@ -1,88 +0,0 @@ -executeCommand("AUTH CRAM-MD5\r\n", array(334)); - $challenge = base64_decode(substr($challenge, 4)); - $message = base64_encode( - $username . ' ' . $this->_getResponse($password, $challenge) - ); - $agent->executeCommand(sprintf("%s\r\n", $message), array(235)); - return true; - } - catch (Swift_TransportException $e) - { - $agent->executeCommand("RSET\r\n", array(250)); - return false; - } - } - - /** - * Generate a CRAM-MD5 response from a server challenge. - * @param string $secret - * @param string $challenge - * @return string - */ - private function _getResponse($secret, $challenge) - { - if (strlen($secret) > 64) - { - $secret = pack('H32', md5($secret)); - } - - if (strlen($secret) < 64) - { - $secret = str_pad($secret, 64, chr(0)); - } - - $k_ipad = substr($secret, 0, 64) ^ str_repeat(chr(0x36), 64); - $k_opad = substr($secret, 0, 64) ^ str_repeat(chr(0x5C), 64); - - $inner = pack('H32', md5($k_ipad . $challenge)); - $digest = md5($k_opad . $inner); - - return $digest; - } - -} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/LoginAuthenticator.php b/h-source/External/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/LoginAuthenticator.php deleted file mode 100755 index bd22617..0000000 --- a/h-source/External/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/LoginAuthenticator.php +++ /dev/null @@ -1,58 +0,0 @@ -executeCommand("AUTH LOGIN\r\n", array(334)); - $agent->executeCommand(sprintf("%s\r\n", base64_encode($username)), array(334)); - $agent->executeCommand(sprintf("%s\r\n", base64_encode($password)), array(235)); - return true; - } - catch (Swift_TransportException $e) - { - $agent->executeCommand("RSET\r\n", array(250)); - return false; - } - } - -} diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/PlainAuthenticator.php b/h-source/External/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/PlainAuthenticator.php deleted file mode 100755 index ddd8094..0000000 --- a/h-source/External/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/PlainAuthenticator.php +++ /dev/null @@ -1,57 +0,0 @@ -executeCommand(sprintf("AUTH PLAIN %s\r\n", $message), array(235)); - return true; - } - catch (Swift_TransportException $e) - { - $agent->executeCommand("RSET\r\n", array(250)); - return false; - } - } - -} -- cgit v1.2.3