English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
O elemento <keygen> do HTML é para facilitar a geração de materiais de chave e submissão da chave pública como parte de um formulário HTML. Este mecanismo é usado para projetar sistemas de gerenciamento de certificados baseados na Web. Segundo o esperado, o elemento <keygen> será usado para construir uma solicitação de certificado junto com informações necessárias em formulários HTML, e o resultado desse processo será um certificado com assinatura.
Esta tag foi descontinuada no novo padrão da Web.
Formulário com campo keygen:
!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Manual Básico(oldtoolbag.com)</title> </head> <body> <form action="demo-form.php" method="get"> Nome de usuário: <input type="text" name="usr_name"> Criptografia: <keygen name="name" challenge="challenge string" keytype="type" keyparams="pqg-params"> <input type="submit"> </form> <p><strong>Atenção:/strong> O Internet Explorer não suporta a tag keygen.</p> </body> </html>Teste e veja ‹/›
IEFirefoxOperaChromeSafari
Firefox, Opera, Chrome e Safari 6 Todos suportam a tag <keygen>.
A tag <keygen> define um campo gerador de pares de chaves para o formulário.
Quando o formulário é submetido, a chave privada é armazenada localmente e a chave pública é enviada para o servidor.
Esta característica foi removida dos padrões da Web, embora alguns navegadores ainda a suportem atualmente, pode ser que parem de suportá-la em algum momento futuro. Evite usar essa característica.
<keygen> element is HTML5 New tag.
New: HTML5 New attribute.
Attribute | Value | Description |
---|---|---|
autofocusHTML5 | autofocus | Make the <keygen> field get focus when the page loads. |
challengeNew | challenge | If used, set the keygen value to ask for it at submission. |
disabledHTML5 | disabled | Disable the <keygen> element field. |
formHTML5 | form_id | Define one or more forms that the <keygen> field belongs to. |
keytypeHTML5 | rsa dsa ec | Define the secure key algorithm. |
nameHTML5 | name | Define the unique name of the <keygen> element. The name attribute is used to collect the value of the field when submitting the form. |
<keygen> tag supports global attributes, see the complete attribute table HTML global attributes.
<keygen> tag supports all HTML event attributes.