javax.crypto (Java SE 24 & JDK 24)

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

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

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

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.

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.

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

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

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

This is the generic ExemptionMechanism exception.

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

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.

Preview.

This class provides the functionality of a Key Derivation Function (KDF), which is a cryptographic algorithm for deriving additional keys from input keying material (IKM) and (optionally) other data.

Preview.

A specification of Key Derivation Function (KDFPREVIEW) parameters.

Preview.

This class defines the Service Provider Interface (SPI) for the Key Derivation Function (KDFPREVIEW) class.

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

This class specifies the return value of the encapsulate method of a Key Encapsulation Mechanism (KEM), which includes the shared secret (as a SecretKey), the key encapsulation message, and optional parameters.

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

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

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

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

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

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

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

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

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

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

A secret (symmetric) key.

This class represents a factory for secret keys.

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

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