protected function generateSignature($params, $secret) {
    // Work with sorted data.
    ksort($params);

    // Generate the base string.
    $base_string = '';
    foreach ($params as $key => $value) {
      $base_string .= $key . '=' . $value;
    }
    $base_string .= $secret;

    return md5($base_string);
  }
protected function generateSignature($params, $secret) {
    // Work with sorted data.
    ksort($params);

    // Generate the base string.
    $base_string = '';
    foreach ($params as $key => $value) {
      $base_string .= $key . '=' . $value;
    }
    $base_string .= $secret;

    return md5($base_string);
  }
protected function generateSignature ( $ params , $ secret ) { // Work with sorted data.
 ksort ( $ params ) ; // Generate the base string.
 $ base_string = '' ; foreach ( $ params as $ key => $ value ) { $ base_string .= $ key . '=' . $ value ; } $ base_string .= $ secret ; return md5 ( $ base_string ) ; }
Generate a signature for the given params and secret.

@param $params
The parameters to sign.
@param $secret
The secret to sign with.

@return
The generated signature
Generate a signature for the given params and secret .