WC_Session_Handler::hash
Hash a value using wp_fast_hash (from WP 6.8 onwards).
This method can be removed when the minimum version supported is 6.8.
Method of the class: WC_Session_Handler{}
No Hooks.
Returns
String. Hashed value.
Usage
// private - for code of main (parent) class only $result = $this->hash( $message );
- $message(string) (required)
- Value to hash.
WC_Session_Handler::hash() WC Session Handler::hash code WC 10.3.3
private function hash( string $message ) {
if ( function_exists( 'wp_fast_hash' ) ) {
return wp_fast_hash( $message );
}
return hash_hmac( 'md5', $message, wp_hash( $message ) );
}