< prev index next >

src/java.base/share/classes/java/security/Key.java

Print this page




  92  * @see KeyPairGenerator
  93  * @see KeyFactory
  94  * @see KeyRep
  95  * @see java.security.spec.KeySpec
  96  * @see Identity
  97  * @see Signer
  98  *
  99  * @author Benjamin Renaud
 100  * @since 1.1
 101  */
 102 
 103 public interface Key extends java.io.Serializable {
 104 
 105     // Declare serialVersionUID to be compatible with JDK1.1
 106 
 107    /**
 108     * The class fingerprint that is set to indicate
 109     * serialization compatibility with a previous
 110     * version of the class.
 111     */

 112     static final long serialVersionUID = 6603384152749567654L;
 113 
 114     /**
 115      * Returns the standard algorithm name for this key. For
 116      * example, "DSA" would indicate that this key is a DSA key.
 117      * See the <a href=
 118      * "{@docRoot}/../specs/security/standard-names.html">
 119      * Java Security Standard Algorithm Names</a> document
 120      * for more information.
 121      *
 122      * @return the name of the algorithm associated with this key.
 123      */
 124     public String getAlgorithm();
 125 
 126     /**
 127      * Returns the name of the primary encoding format of this key,
 128      * or null if this key does not support encoding.
 129      * The primary encoding format is
 130      * named in terms of the appropriate ASN.1 data format, if an
 131      * ASN.1 specification for this key exists.




  92  * @see KeyPairGenerator
  93  * @see KeyFactory
  94  * @see KeyRep
  95  * @see java.security.spec.KeySpec
  96  * @see Identity
  97  * @see Signer
  98  *
  99  * @author Benjamin Renaud
 100  * @since 1.1
 101  */
 102 
 103 public interface Key extends java.io.Serializable {
 104 
 105     // Declare serialVersionUID to be compatible with JDK1.1
 106 
 107    /**
 108     * The class fingerprint that is set to indicate
 109     * serialization compatibility with a previous
 110     * version of the class.
 111     */
 112     @SuppressWarnings("serial") // serialVersionUID in an interface is ineffectual
 113     static final long serialVersionUID = 6603384152749567654L;
 114 
 115     /**
 116      * Returns the standard algorithm name for this key. For
 117      * example, "DSA" would indicate that this key is a DSA key.
 118      * See the <a href=
 119      * "{@docRoot}/../specs/security/standard-names.html">
 120      * Java Security Standard Algorithm Names</a> document
 121      * for more information.
 122      *
 123      * @return the name of the algorithm associated with this key.
 124      */
 125     public String getAlgorithm();
 126 
 127     /**
 128      * Returns the name of the primary encoding format of this key,
 129      * or null if this key does not support encoding.
 130      * The primary encoding format is
 131      * named in terms of the appropriate ASN.1 data format, if an
 132      * ASN.1 specification for this key exists.


< prev index next >