WordPress at a glance
function is not described

WP_Session_Tokens::hash_token() private WP 4.0.0

Hashes the given session token for storage.

{} It's a method of the class: WP_Session_Tokens{}

No Hooks.

Return

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.

Code of WP_Session_Tokens::hash_token() WP 5.5.1

<?php
final private function hash_token( $token ) {
	// If ext/hash is not present, use sha1() instead.
	if ( function_exists( 'hash' ) ) {
		return hash( 'sha256', $token );
	} else {
		return sha1( $token );
	}
}