< prev index next >

jdk/src/java.security.jgss/share/classes/javax/security/auth/kerberos/EncryptionKey.java

Print this page




  27 
  28 import java.util.Arrays;
  29 import java.util.Objects;
  30 import javax.crypto.SecretKey;
  31 import javax.security.auth.DestroyFailedException;
  32 
  33 /**
  34  * This class encapsulates an EncryptionKey used in Kerberos.<p>
  35  *
  36  * An EncryptionKey is defined in Section 4.2.9 of the Kerberos Protocol
  37  * Specification (<a href=http://www.ietf.org/rfc/rfc4120.txt>RFC 4120</a>) as:
  38  * <pre>
  39  *     EncryptionKey   ::= SEQUENCE {
  40  *             keytype         [0] Int32 -- actually encryption type --,
  41  *             keyvalue        [1] OCTET STRING
  42  *     }
  43  * </pre>
  44  * The key material of an {@code EncryptionKey} is defined as the value
  45  * of the {@code keyValue} above.
  46  *
  47  * @since 1.9
  48  */
  49 public final class EncryptionKey implements SecretKey {
  50 
  51     private static final long serialVersionUID = 9L;
  52 
  53    /**
  54     * {@code KeyImpl} is serialized by writing out the ASN.1 encoded bytes
  55     * of the encryption key.
  56     *
  57     * @serial
  58     */
  59     final private KeyImpl key;
  60 
  61     private transient boolean destroyed = false;
  62 
  63     /**
  64      * Constructs a {@code EncryptionKey} from the given bytes and
  65      * the key type.
  66      * <p>
  67      * The contents of the byte array are copied; subsequent modification of




  27 
  28 import java.util.Arrays;
  29 import java.util.Objects;
  30 import javax.crypto.SecretKey;
  31 import javax.security.auth.DestroyFailedException;
  32 
  33 /**
  34  * This class encapsulates an EncryptionKey used in Kerberos.<p>
  35  *
  36  * An EncryptionKey is defined in Section 4.2.9 of the Kerberos Protocol
  37  * Specification (<a href=http://www.ietf.org/rfc/rfc4120.txt>RFC 4120</a>) as:
  38  * <pre>
  39  *     EncryptionKey   ::= SEQUENCE {
  40  *             keytype         [0] Int32 -- actually encryption type --,
  41  *             keyvalue        [1] OCTET STRING
  42  *     }
  43  * </pre>
  44  * The key material of an {@code EncryptionKey} is defined as the value
  45  * of the {@code keyValue} above.
  46  *
  47  * @since 9
  48  */
  49 public final class EncryptionKey implements SecretKey {
  50 
  51     private static final long serialVersionUID = 9L;
  52 
  53    /**
  54     * {@code KeyImpl} is serialized by writing out the ASN.1 encoded bytes
  55     * of the encryption key.
  56     *
  57     * @serial
  58     */
  59     final private KeyImpl key;
  60 
  61     private transient boolean destroyed = false;
  62 
  63     /**
  64      * Constructs a {@code EncryptionKey} from the given bytes and
  65      * the key type.
  66      * <p>
  67      * The contents of the byte array are copied; subsequent modification of


< prev index next >