You are here

function honeypot_get_signed_timestamp in Honeypot 7

Sign the timestamp $time.

Parameters

mixed $time: The timestamp to sign.

Return value

string A signed timestamp in the form timestamp|HMAC.

3 calls to honeypot_get_signed_timestamp()
honeypot_add_form_protection in ./honeypot.module
Form builder function to add different types of protection to forms.
honeypot_library in ./honeypot.module
Implements hook_library().
_honeypot_time_restriction_validate in ./honeypot.module
Validate honeypot's time restriction field.

File

./honeypot.module, line 561
Honeypot module, for deterring spam bots from completing Drupal forms.

Code

function honeypot_get_signed_timestamp($time) {
  return $time . '|' . drupal_hmac_base64($time, drupal_get_private_key());
}