wp_hash()
wp_hash( string $data, string $scheme = ‘auth’ ) 获取给定字符…
wp_hash( string $data, string $scheme = ‘auth’ )
获取给定字符串的哈希值。
Get hash of given string.
获取给定字符串的哈希值。
Get hash of given string.
目录锚点:#参数#源码
参数(Parameters)
| 参数 | 类型 | 说明 |
|---|---|---|
| $data | (string) | 纯文本到哈希 |
| $scheme | (string) | 身份验证方案(身份验证、安全验证、已登录、当前) |
源码(Source)
/**
* Get hash of given string.
*
* @since 2.0.3
*
* @param string $data Plain text to hash
* @return string Hash of $data
*/
function wp_hash($data, $scheme = 'auth') {
$salt = wp_salt($scheme);
return hash_hmac('md5', $data, $salt);
}
endif;
if ( !function_exists('wp_hash_password') ) :| 更新版本 | 源码位置 | 使用 | 被使用 |
|---|---|---|---|
| 2.0.3 | wp-includes/pluggable.php | 1 | 3 |
类别:WordPress 函数手册、
本文收集自互联网,转载请注明来源。
如有侵权,请联系 wper_net@163.com 删除。
还没有任何评论,赶紧来占个楼吧!