A license or product key generator is a computer program that generates either a licensing key, serial number, or some other registration information necessary to activate for use a software application.
The KEYGEN Element is commonly used for generating the key pair in the form. Whenever user hit the submit button, the KEYGEN Element creates two key pair, first one is Public Key and another one is Private Key. The private key is encrypted and stored in the local key database and the public key is sent with the form data to the server. The KEYGEN Element is most useful when the user wants to generate the unique key for a particular form.
Here is the Syntax for KEYGEN Element
Below is complete syntax along with example
<!DOCTYPE html> <html> <head> <title>Title name will go here</title> </head> <body> <form action="keygen.php" method="post"> Username: <input type="text" name="text"> Encryption: <keygen name="key"> <input type="submit"> </form> </body> </html>