aboutsummaryrefslogtreecommitdiffstats
path: root/libraries/spongycastle/jce/src/main/java/javax/crypto/SecretKey.java
blob: 8b22f02afa1eece7e40e7d57a29361a1b4de8f2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package javax.crypto;

import java.security.Key;

/**
 * A secret (symmetric) key.
 * <p>
 * This interface contains no methods or constants.
 * Its only purpose is to group (and provide type safety for) secret keys.
 * <p>
 * Provider implementations of this interface must overwrite the
 * <code>equals</code> and <code>hashCode</code> methods inherited from
 * <code>java.lang.Object</code>, so that secret keys are compared based on
 * their underlying key material and not based on reference.
 * <p>
 * Keys that implement this interface return the string <code>RAW</code>
 * as their encoding format (see <code>getFormat</code>), and return the
 * raw key bytes as the result of a <code>getEncoded</code> method call. (The
 * <code>getFormat</code> and <code>getEncoded</code> methods are inherited
 * from the <code>java.security.Key</code> parent interface.)
 *
 * @see SecretKeyFactory
 * @see Cipher
 */
public abstract interface SecretKey
    extends Key
{
}