lib/classes/Swift/Transport/Esmtp/Auth/NTLMAuthenticator.php
protected function md5Encrypt($key, $msg)
    {
        $blocksize = 64;
        if (strlen($key) > $blocksize) {
            $key = pack('H*', md5($key));
        }

        $key = str_pad($key, $blocksize, "\0");
        $ipadk = $key ^ str_repeat("\x36", $blocksize);
        $opadk = $key ^ str_repeat("\x5c", $blocksize);

        return pack('H*', md5($opadk.pack('H*', md5($ipadk.$msg))));
    }
protected function md5Encrypt($key, $msg)
    {
        $blocksize = 64;
        if (strlen($key) > $blocksize) {
            $key = pack('H*', md5($key));
        }

        $key = str_pad($key, $blocksize, "\0");
        $ipadk = $key ^ str_repeat("\x36", $blocksize);
        $opadk = $key ^ str_repeat("\x5c", $blocksize);

        return pack('H*', md5($opadk.pack('H*', md5($ipadk.$msg))));
    }
protected function md5Encrypt ( $ key , $ msg ) { $ blocksize = 64 ; if ( strlen ( $ key ) > $ blocksize ) { $ key = pack ( 'H*' , md5 ( $ key ) ) ; } $ key = str_pad ( $ key , $ blocksize , "\0" ) ; $ ipadk = $ key ^ str_repeat ( "\x36" , $ blocksize ) ; $ opadk = $ key ^ str_repeat ( "\x5c" , $ blocksize ) ; return pack ( 'H*' , md5 ( $ opadk . pack ( 'H*' , md5 ( $ ipadk . $ msg ) ) ) ) ; }
MD5 Encryption.

@param string $key Encryption key
@param string $msg Message to encrypt

@return string
MD5 Encryption .