Edit

HTML keygen Tag

The <keygen> tag generates an encryption key for passing encrypted data to a server. An encryption key is very helpful to secure your data from hacking. When an HTML form is submitted  then browser will generate key pair and store the private key in the browser's local key storage and send the public key to the server.

Example of Code

<form action="/examples/html5/demo_keygen.php" method="post">
    <label>Username: <input type="text" name="username"></label>
    <label>Encryption: <keygen name="key"></label>
    <input type="submit" value="Submit">
</form>

Output