WP_Session_Tokens::hash_token()privateWP 4.0.0

Hashes the given session token for storage.

Method of the class: WP_Session_Tokens{}

No Hooks.

Returns

String. A hash of the session token (a verifier).

Usage

// private - for code of main (parent) class only
$result = $this->hash_token( $token );
$token(string) (required)
Session token to hash.

Changelog

Since 4.0.0 Introduced.

WP_Session_Tokens::hash_token() code WP 6.8.1

private function hash_token( $token ) {
	return hash( 'sha256', $token );
}