KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > crypto > SecretKey


1 /*
2  * @(#)SecretKey.java 1.5 04/01/14
3  *
4  * Copyright (c) 2004 Sun Microsystems, Inc. All Rights Reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7   
8 /*
9  * NOTE:
10  * Because of various external restrictions (i.e. US export
11  * regulations, etc.), the actual source code can not be provided
12  * at this time. This file represents the skeleton of the source
13  * file, so that javadocs of the API can be created.
14  */

15
16 package javax.crypto;
17
18 /**
19  * A secret (symmetric) key.
20  *
21  * <p>This interface contains no methods or constants.
22  * Its only purpose is to group (and provide type safety for) secret keys.
23  *
24  * <p>Provider implementations of this interface must overwrite the
25  * <code>equals</code> and <code>hashCode</code> methods inherited from
26  * <code>java.lang.Object</code>, so that secret keys are compared based on
27  * their underlying key material and not based on reference.
28  *
29  * <p>Keys that implement this interface return the string <code>RAW</code>
30  * as their encoding format (see <code>getFormat</code>), and return the
31  * raw key bytes as the result of a <code>getEncoded</code> method call. (The
32  * <code>getFormat</code> and <code>getEncoded</code> methods are inherited
33  * from the <code>java.security.Key</code> parent interface.)
34  *
35  * @author Jan Luehe
36  *
37  * @version 1.20, 01/14/04
38  *
39  * @see SecretKeyFactory
40  * @see Cipher
41  * @since 1.4
42  */

43 public interface SecretKey extends java.security.Key
44 {
45     /**
46      * The class fingerprint that is set to indicate serialization
47      * compatibility since J2SE 1.4.
48      */

49     public static final long serialVersionUID = -4795878709595146952L;
50 }
51
Popular Tags