/** * Calculate the URL safe base64 encoded SHA1 hmac of a string. * * @param string The string to sign * @param string The key * @return string The signature */ public static function base64_hmac($value, $key) { return Pluf_Utils::urlsafe_b64encode(hash_hmac('sha1', $value, $key, true)); }