function gb_nonce_field($context = '', $referrer = true, $id_prefix = '', $name = 'gb-nonce') { $nonce = gb_nonce_make($context); $name = h($name); $html = '<input type="hidden" id="' . $id_prefix . $name . '" name="' . $name . '" value="' . $nonce . '" />'; if ($referrer) { $html .= '<input type="hidden" name="gb-referrer" value="' . h(gb::url()) . '" />'; } return $html; }
function nonce() { return gb_nonce_make('digest-auth-' . $this->realm, $this->ttl); }