You are here

function clientside_validation_generate_token in Clientside Validation 7

Generate a token to validate AJAX post parameters.

Parameters

string $captcha_validate: The Captcha validation method.

string $captcha_token: A token generated from Captcha.

Return value

string The generated validation token.

2 calls to clientside_validation_generate_token()
clientside_validation_valid_token in ./clientside_validation.module
Validate a token during AJAX post.
_clientside_validation_set_captcha in ./clientside_validation.module

File

./clientside_validation.module, line 1685
Add client side validation to forms.

Code

function clientside_validation_generate_token($captcha_validate, $captcha_token) {
  return drupal_hmac_base64($captcha_validate, $captcha_token . drupal_get_private_key() . drupal_get_hash_salt());
}