Html5 keygen Tag

The keygen tag is used to key generator for a form.The private key is stored broswer and the public key is sent to the server when the form is click or submitted .

Example Code

<!DOCTYPE HTML>
<form action="keygen.php" method="get">
  Username: <input type="text" name="user_name" id="user_name" />
  Encryption Key: <keygen name="encryption_field_name" id="encryption_field_name" />
  <input type="submit" value="Submit" />
</form>

Out Put :



User Name:
Encryption Key:

In the above form User Name is a login name and encryption field will to encrypt a password.In the Encryption keys is having two types first one is "High Grade" and second one is "Medium Grade".when form will submit the keys are stored on server and client side.





Content