bb_hash

The BuddyPress bb hash function.

Description

bb_hash( $data, (string) $scheme = 'auth' ); 

Parameters (2)

0. $data
The data.
1. $scheme — Optional. (string) => 'auth'
The scheme.

Usage

  1. if ( !function_exists( 'bb_hash' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-includes/functions.bb-pluggable.php'; 
  3.  
  4. // The data. 
  5. $data = null; 
  6.  
  7. // The scheme. 
  8. $scheme = 'auth'; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = bb_hash($data, $scheme); 
  12.  

Defined (1)

The function is defined in the following location(s).

/bp-forums/bbpress/bb-includes/functions.bb-pluggable.php  
  1. function bb_hash( $data, $scheme = 'auth' ) {  
  2. $salt = bb_salt( $scheme ); 
  3.  
  4. return hash_hmac( 'md5', $data, $salt );