interface KeySpec

Known Direct Subclasses

DESKeySpec

This class specifies a DES key.

DESedeKeySpec

This class specifies a DES-EDE ("triple-DES") key.

DHPrivateKeySpec

This class specifies a Diffie-Hellman private key with its associated parameters.

DHPublicKeySpec

This class specifies a Diffie-Hellman public key with its associated parameters.

DSAPrivateKeySpec

This class specifies a DSA private key with its associated parameters.

DSAPublicKeySpec

This class specifies a DSA public key with its associated parameters.

ECPrivateKeySpec

This immutable class specifies an elliptic curve private key with its associated parameters.

ECPublicKeySpec

This immutable class specifies an elliptic curve public key with its associated parameters.

EdECPrivateKeySpec

A class representing elliptic curve private keys as defined in RFC 8032: Edwards-Curve Digital Signature Algorithm (EdDSA), including the curve and other algorithm parameters.

EdECPublicKeySpec

A class representing elliptic curve public keys as defined in RFC 8032: Edwards-Curve Digital Signature Algorithm (EdDSA), including the curve and other algorithm parameters.

EncodedKeySpec

This class represents a public or private key in encoded format.

KeyInfo

Information about a key from the Android Keystore system.

PBEKeySpec

A user-chosen password that can be used with password-based encryption (PBE).

RSAPrivateKeySpec

This class specifies an RSA private key.

RSAPublicKeySpec

This class specifies an RSA public key.

SecretKeySpec

This class specifies a secret key in a provider-independent fashion.

XECPrivateKeySpec

A class representing elliptic curve private keys as defined in RFC 7748, including the curve and other algorithm parameters.

XECPublicKeySpec

A class representing elliptic curve public keys as defined in RFC 7748, including the curve and other algorithm parameters.

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), or it may be specified using its DER encoding (see 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.

Summary

Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Last updated 2025-02-10 UTC.