function createAuthToken() { $token = md5($this->_config->get("serial", "symphony") . $this->_author['password']); $token = General::substrmin($token, 8); return $token; }
/** * Creates an author token using the `Cryptography::hash` function and the * current Author's username and password. The default hash function * is SHA1 * * @see toolkit.Cryptography#hash() * @see toolkit.General#substrmin() * * @return string */ public function createAuthToken() { return General::substrmin(SHA1::hash($this->get('username') . $this->get('password')), 8); }
/** * This function compares a given token to an Author's actual token. * * @deprecated This function will be removed in the next major release. It * is unused by Symphony. * @param string $token * A token to test against this Author's token * @return boolean */ public function verifyToken($token) { if (!$this->isTokenActive()) { return false; } $t = General::substrmin(General::hash($this->get('username') . $this->get('password')), 8); return $t == $token; }
function createAuthToken() { return General::substrmin(md5($this->get('username') . $this->get('password')), 8); }
public function createAuthToken() { return General::substrmin(md5($this->username . $this->password), 8); }