本文整理汇总了PHP中General::substrmin方法的典型用法代码示例。如果您正苦于以下问题:PHP General::substrmin方法的具体用法?PHP General::substrmin怎么用?PHP General::substrmin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类General
的用法示例。
在下文中一共展示了General::substrmin方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: createAuthToken
function createAuthToken()
{
$token = md5($this->_config->get("serial", "symphony") . $this->_author['password']);
$token = General::substrmin($token, 8);
return $token;
}
示例2: createAuthToken
/**
* 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);
}
示例3: verifyToken
/**
* 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;
}
示例4: createAuthToken
function createAuthToken()
{
return General::substrmin(md5($this->get('username') . $this->get('password')), 8);
}
示例5: createAuthToken
public function createAuthToken()
{
return General::substrmin(md5($this->username . $this->password), 8);
}