HTML <keygen> keytype Attribute
The HTML <keygen> keytype attribute is used to define the type of key which would be used. Basically, this attribute is used to secure the form data.
Note: The keytype may be different in different browsers.
Syntax:
<keygen keytype="rsa|dsa|ec">
Attribute values:
- rsa: It is a default value. It defines an RSA security algorithm. It gives a choice of RSA key strengths to the user.
- dsa: It defines a DSA security algorithm. It gives a choice of DSA key sizes to the user.
- ec: It defines an EC security algorithm. It gives a choice of EC key strengths to the user.
Example: Below code illustrates the keytype attribute of the <keygen> element.
HTML
<!DOCTYPE html> < html > < head > < title > HTML keygen keytype attribute </ title > </ head > < body > < center > < h1 style = "color:green;" > w3wiki </ h1 > < h2 >HTML Keygen keytype attribute</ h2 > < form > Username: < input type = "text" name = "uname" > < br >< br > Encryption: < keygen form = "myBeginner" keytype = "rsa" name = "secure" disabled> < input type = "submit" > </ form > </ center > </ body > </ html > |
Output:
Supported Browsers:
- Google Chrome
- Firefox
- Opera