Latest web development tutorials
 

Keygen keytype Property

< Keygen Object

Example

Get the type of key used:

var x = document.getElementById("myKeygen").keytype;

The result of x will be:

rsa
Try it Yourself »

Definition and Usage

The ketype property sets or returns the value of the keytype attribute of a keygen field.

The keytype attribute specifies a key type to be used.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The keytype property is supported in all major browsers, except Internet Explorer and Safari.


Syntax

Return the keytype property:

keygenObject.keytype

Set the keytype property:

keygenObject.keytype="rsa|dsa|ec"

Property Values

Value Description
rsa Default. Specifies an RSA security algorithm. The user may be given a choice of RSA key strengths
dsa Specifies a DSA security algorithm. The user may be given a choice of DSA key sizes
ec Specifies an EC security algorithm. The user may be given a choice of EC key strengths

Technical Details

Return Value: A String, representing the type of key used

Related Pages

HTML reference: HTML <keygen> keytype attribute


< Keygen Object