wp_hash
函数
wp_hash ( $data, $scheme = 'auth' )
- 参数
-
-
(string)
$data
Plain text to hash.- Required: 是
-
(string)
$scheme
Authentication scheme (auth, secure_auth, logged_in, nonce).- Required: 否
- Default: ‘auth’
-
(string)
- 返回值
-
- (string) Hash of $data.
- 定义位置
-
-
wp-includes/pluggable.php
, line 2478
-
wp-includes/pluggable.php
- 引入
- 2.0.3
- 弃用
- –
获取给定字符串的哈希值。
function wp_hash( $data, $scheme = 'auth' ) {
$salt = wp_salt( $scheme );
return hash_hmac( 'md5', $data, $salt );
}
endif;
if ( ! function_exists( 'wp_hash_password' ) ) :
/**
* Creates a hash (encrypt) of a plain text password.
*
* For integration with other applications, this function can be overwritten to
* instead use the other package password checking algorithm.
*
* @since 2.5.0
*
* @global PasswordHash $wp_hasher PHPass object
*
* @param string $password Plain text user password to hash.
* @return string The hash string of the password.
*/
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。