Top Description Interfaces Classes
module java.base

Package javax.crypto


Provides the classes and interfaces for cryptographic operations. The cryptographic operations defined in this package include encryption, key generation and key agreement, and Message Authentication Code (MAC) generation.

Support for encryption includes symmetric, asymmetric, block, and stream ciphers. This package also supports secure streams and sealed objects.

Many of the classes provided in this package are provider-based. The class itself defines a programming interface to which applications may write. The implementations themselves may then be written by independent third-party vendors and plugged in seamlessly as needed. Therefore, application developers may take advantage of any number of provider-based implementations without having to add or rewrite code.

Related Documentation

For further documentation, please see:
Since
1.4

Interface Summary

Modifier and TypeInterface and Description
public interface
KEMSpi

This class defines the Service Provider Interface (SPI) for the KEM class.

public interface
SecretKey

A secret (symmetric) key.

Class Summary

Modifier and TypeClass and Description
public class
AEADBadTagException

This exception is thrown when a Cipher operating in an AEAD mode (such as GCM/CCM) is unable to verify the supplied authentication tag.

public class
BadPaddingException

This exception is thrown when a particular padding mechanism is expected for the input data but the data is not padded properly.

public class
Cipher

This class provides the functionality of a cryptographic cipher for encryption and decryption.

public class
CipherInputStream

A CipherInputStream is composed of an InputStream and a Cipher object so that read() methods return data that are read in from the underlying InputStream but have been additionally processed by the Cipher object.

public class
CipherOutputStream

A CipherOutputStream is composed of an OutputStream and a Cipher object so that write() methods first process the data before writing them out to the underlying OutputStream.

public abstract class
CipherSpi

This class defines the Service Provider Interface (SPI) for the Cipher class.

pack-priv class
CryptoAllPermission

The CryptoAllPermission is a permission that implies any other crypto permissions.

pack-priv class
CryptoAllPermissionCollection

A CryptoAllPermissionCollection stores a collection of CryptoAllPermission objects.

pack-priv class
CryptoPermission

The CryptoPermission class extends the java.security.Permission class.

pack-priv class
CryptoPermissionCollection

A CryptoPermissionCollection object stores a set of CryptoPermission objects.

pack-priv class
CryptoPermissions

This class contains CryptoPermission objects, organized into PermissionCollection objects according to algorithm names.

pack-priv class
CryptoPolicyParser

JCE has two pairs of jurisdiction policy files: one represents U.S.

public class
DecapsulateException

An exception that is thrown by the javax.crypto.KEM.Decapsulator#decapsulate method to denote an error during decapsulation.

public class
EncryptedPrivateKeyInfo

This class implements the EncryptedPrivateKeyInfo type as defined in PKCS #8.

public class
ExemptionMechanism

This class provides the functionality of an exemption mechanism, examples of which are key recovery, key weakening, and key escrow.

public class
ExemptionMechanismException

This is the generic ExemptionMechanism exception.

public abstract class
ExemptionMechanismSpi

This class defines the Service Provider Interface (SPI) for the ExemptionMechanism class.

pack-priv class
public class
IllegalBlockSizeException

This exception is thrown when the length of data provided to a block cipher is incorrect, i.e., does not match the block size of the cipher.

pack-priv class
JceSecurity

This class instantiates implementations of JCE engine classes from providers registered with the java.security.Security object.

pack-priv class
JceSecurityManager

The JCE security manager.

public class
KEM

This class provides the functionality of a Key Encapsulation Mechanism (KEM).

public class
KeyAgreement

This class provides the functionality of a key agreement (or key exchange) protocol.

public abstract class
KeyAgreementSpi

This class defines the Service Provider Interface (SPI) for the KeyAgreement class.

public class
KeyGenerator

This class provides the functionality of a secret (symmetric) key generator.

public abstract class
KeyGeneratorSpi

This class defines the Service Provider Interface (SPI) for the KeyGenerator class.

public class
Mac

This class provides the functionality of a "Message Authentication Code" (MAC) algorithm.

public abstract class
MacSpi

This class defines the Service Provider Interface (SPI) for the Mac class.

public class
NoSuchPaddingException

This exception is thrown when a particular padding mechanism is requested but is not available in the environment.

public class
NullCipher

The NullCipher class is a class that provides an "identity cipher" -- one that does not transform the plain text.

pack-priv class
NullCipherSpi

This class provides a delegate for the identity cipher - one that does not transform the plain text.

pack-priv class
pack-priv class
ProviderVerifier

This class verifies Provider/Policy resources found at a URL (currently only JAR files and any supporting JAR files), and determines whether they may be used in this implementation.

public class
SealedObject

This class enables a programmer to create an object and protect its confidentiality with a cryptographic algorithm.

public class
SecretKeyFactory

This class represents a factory for secret keys.

public abstract class
SecretKeyFactorySpi

This class defines the Service Provider Interface (SPI) for the SecretKeyFactory class.

public class
ShortBufferException

This exception is thrown when an output buffer provided by the user is too short to hold the operation result.