# javax.crypto

### Interfaces

|---|---|
| [SecretKey](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/SecretKey.html) | A secret (symmetric) key. |

### Classes

|---|---|
| [Cipher](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html) | This class provides the functionality of a cryptographic cipher for encryption and decryption. |
| [CipherInputStream](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/CipherInputStream.html) | A CipherInputStream is composed of an InputStream and a Cipher so that read() methods return data that are read in from the underlying InputStream but have been additionally processed by the Cipher. |
| [CipherOutputStream](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/CipherOutputStream.html) | A CipherOutputStream is composed of an OutputStream and a Cipher so that write() methods first process the data before writing them out to the underlying OutputStream. |
| [CipherSpi](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/CipherSpi.html) | This class defines the *Service Provider Interface* (**SPI** ) for the `Cipher` class. |
| [ExemptionMechanism](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/ExemptionMechanism.html) | This class provides the functionality of an exemption mechanism, examples of which are *key recovery*, *key weakening*, and *key escrow*. |
| [ExemptionMechanismSpi](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/ExemptionMechanismSpi.html) | This class defines the *Service Provider Interface* (**SPI** ) for the `ExemptionMechanism` class. |
| [KeyAgreement](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/KeyAgreement.html) | This class provides the functionality of a key agreement (or key exchange) protocol. |
| [KeyAgreementSpi](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/KeyAgreementSpi.html) | This class defines the *Service Provider Interface* (**SPI** ) for the `KeyAgreement` class. |
| [KeyGenerator](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/KeyGenerator.html) | This class provides the functionality of a secret (symmetric) key generator. |
| [KeyGeneratorSpi](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/KeyGeneratorSpi.html) | This class defines the *Service Provider Interface* (**SPI** ) for the `KeyGenerator` class. |
| [Mac](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Mac.html) | This class provides the functionality of a "Message Authentication Code" (MAC) algorithm. |
| [MacSpi](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/MacSpi.html) | This class defines the *Service Provider Interface* (**SPI** ) for the `Mac` class. |
| [NullCipher](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/NullCipher.html) | The NullCipher class is a class that provides an "identity cipher" -- one that does not transform the plain text. |
| [SealedObject](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/SealedObject.html) | This class enables a programmer to create an object and protect its confidentiality with a cryptographic algorithm. |
| [SecretKeyFactory](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/SecretKeyFactory.html) | This class represents a factory for secret keys. |
| [SecretKeyFactorySpi](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/SecretKeyFactorySpi.html) | This class defines the *Service Provider Interface* (**SPI** ) for the `SecretKeyFactory` class. |

### Exceptions

|---|---|
| [AEADBadTagException](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/AEADBadTagException.html) | This exception is thrown when a `https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html` operating in an AEAD mode (such as GCM/CCM) is unable to verify the supplied authentication tag. |
| [BadPaddingException](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/BadPaddingException.html) | This exception is thrown when a particular padding mechanism is expected for the input data but the data is not padded properly. |
| [ExemptionMechanismException](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/ExemptionMechanismException.html) | This is the generic ExemptionMechanism exception. |
| [IllegalBlockSizeException](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/IllegalBlockSizeException.html) | 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. |
| [NoSuchPaddingException](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/NoSuchPaddingException.html) | This exception is thrown when a particular padding mechanism is requested but is not available in the environment. |
| [ShortBufferException](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/ShortBufferException.html) | This exception is thrown when an output buffer provided by the user is too short to hold the operation result. |