| Modifier and Type | Field and Description | 
|---|---|
| static int | DES_KEY_LEN
              定义DES密钥长度的常量(以字节为单位)。 
             | 
| Constructor and Description | 
|---|
| DESKeySpec(byte[] key)
              创建使用前8个字节中一个DESKeySpec对象, 
              key作为DES密钥的密钥材料。 | 
| DESKeySpec(byte[] key, int offset)
              创建使用前8个字节中一个DESKeySpec对象, 
              key,在开始offset以下,作为DES密钥的密钥材料。 | 
public static final int DES_KEY_LEN
public DESKeySpec(byte[] key)
           throws InvalidKeyException 
          key作为DES密钥的密钥材料。 
            构成该DES密钥的字节在之间key[0]和key[7]以下。 
key - 具有DES密钥资料的缓冲区。 
            复制缓冲区的前8个字节以防止后续修改。 
           NullPointerException - 如果给定的键材料是 
            null 
           InvalidKeyException - 如果给定的密钥材料短于8个字节。 
           public DESKeySpec(byte[] key,
                  int offset)
           throws InvalidKeyException 
          key ,在开始offset以下,作为DES密钥的密钥材料。 
            构成该DES密钥的字节在之间key[offset]和key[offset+7]以下。 
key - 具有DES密钥资料的缓冲区。 
            前8个字节在开始缓冲的offset包容被复制到防止后续修改。 
           offset - 偏移在 
            key ,其中DES密钥材料启动。 
           NullPointerException - 如果给定的密钥材料是 
            null 
           InvalidKeyException - 如果从 
            offset开始,给定的密钥资料短于8个字节。 
           public byte[] getKey()
public static boolean isParityAdjusted(byte[] key,
                                       int offset)
                                throws InvalidKeyException 
          offset包括起始)进行奇偶校验调整。 
          key - 具有DES密钥资料的缓冲区。 
           offset - 偏移量在 
            key ,其中DES密钥材料启动。 
           InvalidKeyException - 如果给定的密钥资料是 
            null ,或从 
            offset开始,短于8个字节。 
           public static boolean isWeak(byte[] key,
                             int offset)
                      throws InvalidKeyException 
          key - 具有DES密钥资料的缓冲区。 
           offset - 偏移在 
            key ,其中DES密钥材料启动。 
           InvalidKeyException - 如果给定的密钥材料是 
            null ,或从 
            offset开始,短于8个字节。 
            Submit a bug or feature 
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.