codescracker


html

HTML KEYGEN Tag



« Previous Tutorial Next Tutorial »


The KEYGEN tag is used to generate the key pair. When a form is submitted, a key pair, which contains the private and public keys, is generated using the KEYGEN tag to secure the content of the form.

The private key from the generated key pair is encrypted and stored in the key database on local computer. The public key is encrypted and submitted to the server along with the form.

KEYGEN Tag Example

Following is the example of the KEYGEN tag, as shows in the following code snippet.

<KEYGEN name="key_name" challenge="10987654321">

KEYGEN Tag Attributes

Following table shows all the possible attributes used with the KEYGEN tag.

Attribute Description
autofocus Allows the control to get the focus as soon as the page loads
challenge Specifies a string that is used for the verification at the time of submission of a form
disabled Disables the input control
form Refers to the id of the FORM tag
keytype Specifies the type of the key to generate
name Provides a name to the input control

« Previous Tutorial Next Tutorial »



Tools
Calculator

Quick Links
Signup - Login - Give Online Test