wp_hash( string $data, string $scheme = 'auth' )

Gets hash of given string.


Parameters

$data

(Required) Plain text to hash.

$scheme

(Optional) Authentication scheme (auth, secure_auth, logged_in, nonce).

Default value: 'auth'


Return

(string) Hash of $data.


Source

File: wp-includes/pluggable.php

function wp_hash($data, $scheme = 'auth') {
	$salt = wp_salt($scheme);

	return hash_hmac('md5', $data, $salt);
}

Changelog

Changelog
Version Description
2.0.3 Introduced.