WP_Session_Tokens::hash_token

Advertisement

Private Access Private Access

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Summery Summery

Hashes the given session token for storage.

Syntax Syntax

WP_Session_Tokens::hash_token( string $token )

Parameters Parameters

$token

(string) (Required) Session token to hash.

Return Return

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

Source Source

File: wp-includes/class-wp-session-tokens.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 );
		}
	}

Advertisement

Changelog Changelog

Changelog
Version Description
4.0.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.