64) $key = pack("H*", md5($key)); $k_ipad = $key ^ str_repeat(chr(0x36), 64); $k_opad = $key ^ str_repeat(chr(0x5c), 64); $hmac = hmac_md5($k_opad . pack('H*', md5($k_ipad . $data))); return $hmac; } /** * Fillin user and password based on SMTP auth settings. * * @param string $user Reference to SMTP username * @param string $pass Reference to SMTP password (unencrypted) * @since 1.4.11 */ function get_smtp_user(&$user, &$pass) { global $username, $smtp_auth_mech, $smtp_sitewide_user, $smtp_sitewide_pass; if ($smtp_auth_mech == 'none') { $user = ''; $pass = ''; } elseif ( isset($smtp_sitewide_user) && isset($smtp_sitewide_pass) && !empty($smtp_sitewide_user)) { $user = $smtp_sitewide_user; $pass = $smtp_sitewide_pass; } else { $user = $username; $pass = sqauth_read_password(); } // plugin authors note: override $user or $pass by // directly changing the arguments array contents // in your plugin e.g., $args[0] = 'new_username'; // $temp = array(&$user, &$pass); do_hook('smtp_auth', $temp); }