java.security.spec
Interface KeySpec

All Known Implementing Classes:
DSAPrivateKeySpec sample code for java.security.spec.DSAPrivateKeySpec definition code for java.security.spec.DSAPrivateKeySpec , DSAPublicKeySpec sample code for java.security.spec.DSAPublicKeySpec definition code for java.security.spec.DSAPublicKeySpec , ECPrivateKeySpec sample code for java.security.spec.ECPrivateKeySpec definition code for java.security.spec.ECPrivateKeySpec , ECPublicKeySpec sample code for java.security.spec.ECPublicKeySpec definition code for java.security.spec.ECPublicKeySpec , EncodedKeySpec sample code for java.security.spec.EncodedKeySpec definition code for java.security.spec.EncodedKeySpec , PKCS8EncodedKeySpec sample code for java.security.spec.PKCS8EncodedKeySpec definition code for java.security.spec.PKCS8EncodedKeySpec , RSAMultiPrimePrivateCrtKeySpec sample code for java.security.spec.RSAMultiPrimePrivateCrtKeySpec definition code for java.security.spec.RSAMultiPrimePrivateCrtKeySpec , RSAPrivateCrtKeySpec sample code for java.security.spec.RSAPrivateCrtKeySpec definition code for java.security.spec.RSAPrivateCrtKeySpec , RSAPrivateKeySpec sample code for java.security.spec.RSAPrivateKeySpec definition code for java.security.spec.RSAPrivateKeySpec , RSAPublicKeySpec sample code for java.security.spec.RSAPublicKeySpec definition code for java.security.spec.RSAPublicKeySpec , X509EncodedKeySpec sample code for java.security.spec.X509EncodedKeySpec definition code for java.security.spec.X509EncodedKeySpec

public interface KeySpec

A (transparent) specification of the key material that constitutes a cryptographic key.

If the key is stored on a hardware device, its specification may contain information that helps identify the key on the device.

A key may be specified in an algorithm-specific way, or in an algorithm-independent encoding format (such as ASN.1). For example, a DSA private key may be specified by its components x, p, q, and g (see DSAPrivateKeySpec sample code for java.security.spec.DSAPrivateKeySpec definition code for java.security.spec.DSAPrivateKeySpec ), or it may be specified using its DER encoding (see PKCS8EncodedKeySpec sample code for java.security.spec.PKCS8EncodedKeySpec definition code for java.security.spec.PKCS8EncodedKeySpec ).

This interface contains no methods or constants. Its only purpose is to group (and provide type safety for) all key specifications. All key specifications must implement this interface.

Since:
1.2
See Also:
Key sample code for java.security.Key definition code for java.security.Key , KeyFactory sample code for java.security.KeyFactory definition code for java.security.KeyFactory , EncodedKeySpec sample code for java.security.spec.EncodedKeySpec definition code for java.security.spec.EncodedKeySpec , X509EncodedKeySpec sample code for java.security.spec.X509EncodedKeySpec definition code for java.security.spec.X509EncodedKeySpec , PKCS8EncodedKeySpec sample code for java.security.spec.PKCS8EncodedKeySpec definition code for java.security.spec.PKCS8EncodedKeySpec , DSAPrivateKeySpec sample code for java.security.spec.DSAPrivateKeySpec definition code for java.security.spec.DSAPrivateKeySpec , DSAPublicKeySpec sample code for java.security.spec.DSAPublicKeySpec definition code for java.security.spec.DSAPublicKeySpec