Alert: 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.
WP_Session_Tokens::hash_token() WordPress Method
The WP_Session_Tokens::hash_token() method is used to generate a hash of a given session token. This can be used to verify that a given session token is valid.
WP_Session_Tokens::hash_token( string $token ) #
Hashes the given session token for storage.
Parameters
- $token
(string)(Required)Session token to hash.
Return
(string) A hash of the session token (a verifier).
Source
File: wp-includes/class-wp-session-tokens.php
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 ); } }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
4.0.0 | Introduced. |