Please note that this translation of the specification is the result of a java.net community project ( https://jdk5-api-pt-br.dev.java.net/ ). The official version of the specification is the US English language version which can be found at http://java.sun.com/j2se/1.5.0/docs/api/. In case of disputes, the authoritative version of the specification is the original, English document.
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.crypto.spec.DESKeySpec
public class DESKeySpec
Esta classe especifica uma chave DES.
| Field Summary | |
|---|---|
static int |
DES_KEY_LEN
A constante que define o comprimento de uma chave DES em bytes. |
| Constructor Summary | |
|---|---|
DESKeySpec(byte[] key)
Cria um objeto DESKeySpec object usando os primeiros 8 bytes de key como o material de chave para a chave DES. |
|
DESKeySpec(byte[] key,
int offset)
Cria um objeto DESKeySpec object usando os primeiros 8 bytes de key, iniciando ao deslocamento offset inclusive,
como o material de chave para a chave DES. |
|
| Method Summary | |
|---|---|
byte[] |
getKey()
Returns o material de chave DES. |
static boolean |
isParityAdjusted(byte[] key,
int offset)
Checa se a paridade da chave DES, iniciando em offset
inclusive, está ajustada. |
static boolean |
isWeak(byte[] key,
int offset)
Testa se o dado material de chave DES é fraco ou semi-fraco. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DES_KEY_LEN
| Constructor Detail |
|---|
public DESKeySpec(byte[] key)
throws InvalidKeyException
key como o material de chave para a chave DES.
Os bytes que constituem a chave DES key são aqueles entre
key[0] e key[7], inclusive.
key - o buffer com o material de chave DES. Os primeiros
8 bytes do buffer são copiados para precaver-se contra posterior modificação.
NullPointerException - se o dado material de chave for
null
InvalidKeyException - se o dado material de chave for
menor que 8 bytes.
public DESKeySpec(byte[] key,
int offset)
throws InvalidKeyException
key, iniciando ao deslocamento offset inclusive,
como o material de chave para a chave DES.
Os bytes que constituem a chave DES key são aqueles entre
key[offset] e key[offset+7], inclusive.
key - o buffer com o material de chave DES. Os primeiros
7 bytes do buffer, iniciando em offset inclusive,
são copiados para precaver-se contra posterior modificação.offset - o deslocamento em key onde se inicia o material da chave DES-EDE.
NullPointerException - se key for null.
InvalidKeyException - se o dado material de chave, iniciando em
offset inclusive, for menor que 7 bytes.| Method Detail |
|---|
public byte[] getKey()
public static boolean isParityAdjusted(byte[] key,
int offset)
throws InvalidKeyException
offset
inclusive, está ajustada.
key - o buffer com o material de chave DES.offset - o deslocamento no array de bytes em que o material de chave DES se inicia.
InvalidKeyException - se o dado material de chave, iniciando em
offset inclusive, for menor que 7 bytes.
public static boolean isWeak(byte[] key,
int offset)
throws InvalidKeyException
key - o buffer com o material de chave DES.offset - o deslocamento em key em que o material de chave DES se inicia.
InvalidKeyException - se o dado material de chave for
null, ou se o tamanho (iniciando em offset inclusive) for menor que
8 bytes.
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
Copyright 2006 Sun Microsystems, Inc. Todos os direitos reservados. O uso está sujeito aos termos da licensa.