# NullCipher

public class **NullCipher** extends [Cipher](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html)  
The NullCipher class is a class that provides an
"identity cipher" -- one that does not transform the plain text. As
a consequence, the ciphertext is identical to the plaintext. All
initialization methods do nothing, while the blocksize is set to 1
byte.

### Inherited Constant Summary

From class [javax.crypto.Cipher](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html)

|---|---|---|
| int | [DECRYPT_MODE](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html#DECRYPT_MODE) | Constant used to initialize cipher to decryption mode. |
| int | [ENCRYPT_MODE](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html#ENCRYPT_MODE) | Constant used to initialize cipher to encryption mode. |
| int | [PRIVATE_KEY](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html#PRIVATE_KEY) | Constant used to indicate the to-be-unwrapped key is a "private key". |
| int | [PUBLIC_KEY](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html#PUBLIC_KEY) | Constant used to indicate the to-be-unwrapped key is a "public key". |
| int | [SECRET_KEY](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html#SECRET_KEY) | Constant used to indicate the to-be-unwrapped key is a "secret key". |
| int | [UNWRAP_MODE](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html#UNWRAP_MODE) | Constant used to initialize cipher to key-unwrapping mode. |
| int | [WRAP_MODE](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html#WRAP_MODE) | Constant used to initialize cipher to key-wrapping mode. |

### Public Constructor Summary

|---|---|
|   | [NullCipher](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/NullCipher.html#NullCipher())() Creates a NullCipher object. |

### Inherited Method Summary

From class [javax.crypto.Cipher](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html)

|---|---|
| final int | [doFinal](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html#doFinal(byte[],%20int,%20int,%20byte[]))(byte\[\] input, int inputOffset, int inputLen, byte\[\] output) Encrypts or decrypts data in a single-part operation, or finishes a multiple-part operation. |
| final int | [doFinal](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html#doFinal(byte[],%20int))(byte\[\] output, int outputOffset) Finishes a multiple-part encryption or decryption operation, depending on how this cipher was initialized. |
| final byte\[\] | [doFinal](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html#doFinal())() Finishes a multiple-part encryption or decryption operation, depending on how this cipher was initialized. |
| final byte\[\] | [doFinal](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html#doFinal(byte[]))(byte\[\] input) Encrypts or decrypts data in a single-part operation, or finishes a multiple-part operation. |
| final int | [doFinal](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html#doFinal(byte[],%20int,%20int,%20byte[],%20int))(byte\[\] input, int inputOffset, int inputLen, byte\[\] output, int outputOffset) Encrypts or decrypts data in a single-part operation, or finishes a multiple-part operation. |
| final int | [doFinal](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html#doFinal(java.nio.ByteBuffer,%20java.nio.ByteBuffer))([ByteBuffer](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/ByteBuffer.html) input, [ByteBuffer](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/ByteBuffer.html) output) Encrypts or decrypts data in a single-part operation, or finishes a multiple-part operation. |
| final byte\[\] | [doFinal](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html#doFinal(byte[],%20int,%20int))(byte\[\] input, int inputOffset, int inputLen) Encrypts or decrypts data in a single-part operation, or finishes a multiple-part operation. |
| final [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [getAlgorithm](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html#getAlgorithm())() Returns the algorithm name of this `Cipher` object. |
| final int | [getBlockSize](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html#getBlockSize())() Returns the block size (in bytes). |
| final [ExemptionMechanism](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/ExemptionMechanism.html) | [getExemptionMechanism](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html#getExemptionMechanism())() Returns the exemption mechanism object used with this cipher. |
| final byte\[\] | [getIV](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html#getIV())() Returns the initialization vector (IV) in a new buffer. |
| final static [Cipher](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html) | [getInstance](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html#getInstance(java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) transformation) Returns a `Cipher` object that implements the specified transformation. |
| final static [Cipher](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html) | [getInstance](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html#getInstance(java.lang.String,%20java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) transformation, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) provider) Returns a `Cipher` object that implements the specified transformation. |
| final static [Cipher](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html) | [getInstance](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html#getInstance(java.lang.String,%20java.security.Provider))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) transformation, [Provider](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/Provider.html) provider) Returns a `Cipher` object that implements the specified transformation. |
| final static int | [getMaxAllowedKeyLength](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html#getMaxAllowedKeyLength(java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) transformation) Returns the maximum key length for the specified transformation according to the installed JCE jurisdiction policy files. |
| final static [AlgorithmParameterSpec](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/spec/AlgorithmParameterSpec.html) | [getMaxAllowedParameterSpec](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html#getMaxAllowedParameterSpec(java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) transformation) Returns an AlgorithmParameterSpec object which contains the maximum cipher parameter value according to the jurisdiction policy file. |
| final int | [getOutputSize](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html#getOutputSize(int))(int inputLen) Returns the length in bytes that an output buffer would need to be in order to hold the result of the next `update` or `doFinal` operation, given the input length `inputLen` (in bytes). |
| final [AlgorithmParameters](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/AlgorithmParameters.html) | [getParameters](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html#getParameters())() Returns the parameters used with this cipher. |
| final [Provider](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/Provider.html) | [getProvider](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html#getProvider())() Returns the provider of this `Cipher` object. |
| final void | [init](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html#init(int,%20java.security.Key,%20java.security.AlgorithmParameters))(int opmode, [Key](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/Key.html) key, [AlgorithmParameters](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/AlgorithmParameters.html) params) Initializes this cipher with a key and a set of algorithm parameters. |
| final void | [init](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html#init(int,%20java.security.cert.Certificate,%20java.security.SecureRandom))(int opmode, [Certificate](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/cert/Certificate.html) certificate, [SecureRandom](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/SecureRandom.html) random) Initializes this cipher with the public key from the given certificate and a source of randomness. |
| final void | [init](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html#init(int,%20java.security.Key,%20java.security.SecureRandom))(int opmode, [Key](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/Key.html) key, [SecureRandom](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/SecureRandom.html) random) Initializes this cipher with a key and a source of randomness. |
| final void | [init](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html#init(int,%20java.security.Key,%20java.security.spec.AlgorithmParameterSpec))(int opmode, [Key](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/Key.html) key, [AlgorithmParameterSpec](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/spec/AlgorithmParameterSpec.html) params) Initializes this cipher with a key and a set of algorithm parameters. |
| final void | [init](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html#init(int,%20java.security.Key))(int opmode, [Key](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/Key.html) key) Initializes this cipher with a key. |
| final void | [init](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html#init(int,%20java.security.Key,%20java.security.spec.AlgorithmParameterSpec,%20java.security.SecureRandom))(int opmode, [Key](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/Key.html) key, [AlgorithmParameterSpec](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/spec/AlgorithmParameterSpec.html) params, [SecureRandom](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/SecureRandom.html) random) Initializes this cipher with a key, a set of algorithm parameters, and a source of randomness. |
| final void | [init](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html#init(int,%20java.security.cert.Certificate))(int opmode, [Certificate](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/cert/Certificate.html) certificate) Initializes this cipher with the public key from the given certificate. |
| final void | [init](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html#init(int,%20java.security.Key,%20java.security.AlgorithmParameters,%20java.security.SecureRandom))(int opmode, [Key](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/Key.html) key, [AlgorithmParameters](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/AlgorithmParameters.html) params, [SecureRandom](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/SecureRandom.html) random) Initializes this cipher with a key, a set of algorithm parameters, and a source of randomness. |
| final [Key](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/Key.html) | [unwrap](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html#unwrap(byte[],%20java.lang.String,%20int))(byte\[\] wrappedKey, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) wrappedKeyAlgorithm, int wrappedKeyType) Unwrap a previously wrapped key. |
| final byte\[\] | [update](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html#update(byte[]))(byte\[\] input) Continues a multiple-part encryption or decryption operation (depending on how this cipher was initialized), processing another data part. |
| final int | [update](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html#update(byte[],%20int,%20int,%20byte[]))(byte\[\] input, int inputOffset, int inputLen, byte\[\] output) Continues a multiple-part encryption or decryption operation (depending on how this cipher was initialized), processing another data part. |
| final byte\[\] | [update](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html#update(byte[],%20int,%20int))(byte\[\] input, int inputOffset, int inputLen) Continues a multiple-part encryption or decryption operation (depending on how this cipher was initialized), processing another data part. |
| final int | [update](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html#update(java.nio.ByteBuffer,%20java.nio.ByteBuffer))([ByteBuffer](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/ByteBuffer.html) input, [ByteBuffer](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/ByteBuffer.html) output) Continues a multiple-part encryption or decryption operation (depending on how this cipher was initialized), processing another data part. |
| final int | [update](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html#update(byte[],%20int,%20int,%20byte[],%20int))(byte\[\] input, int inputOffset, int inputLen, byte\[\] output, int outputOffset) Continues a multiple-part encryption or decryption operation (depending on how this cipher was initialized), processing another data part. |
| final void | [updateAAD](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html#updateAAD(byte[],%20int,%20int))(byte\[\] src, int offset, int len) Continues a multi-part update of the Additional Authentication Data (AAD), using a subset of the provided buffer. |
| final void | [updateAAD](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html#updateAAD(java.nio.ByteBuffer))([ByteBuffer](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/ByteBuffer.html) src) Continues a multi-part update of the Additional Authentication Data (AAD). |
| final void | [updateAAD](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html#updateAAD(byte[]))(byte\[\] src) Continues a multi-part update of the Additional Authentication Data (AAD). |
| final byte\[\] | [wrap](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/Cipher.html#wrap(java.security.Key))([Key](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/Key.html) key) Wrap a key. |

From class [java.lang.Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html)

|---|---|
| [Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) | [clone](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#clone())() Creates and returns a copy of this `Object`. |
| boolean | [equals](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#equals(java.lang.Object))([Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) obj) Compares this instance with the specified object and indicates if they are equal. |
| void | [finalize](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#finalize())() Invoked when the garbage collector has detected that this instance is no longer reachable. |
| final [Class](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Class.html)\<?\> | [getClass](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#getClass())() Returns the unique instance of `https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Class.html` that represents this object's class. |
| int | [hashCode](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#hashCode())() Returns an integer hash code for this object. |
| final void | [notify](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#notify())() Causes a thread which is waiting on this object's monitor (by means of calling one of the `wait()` methods) to be woken up. |
| final void | [notifyAll](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#notifyAll())() Causes all threads which are waiting on this object's monitor (by means of calling one of the `wait()` methods) to be woken up. |
| [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [toString](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#toString())() Returns a string containing a concise, human-readable description of this object. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait(long,%20int))(long timeout, int nanos) Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object or until the specified timeout expires. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait(long))(long timeout) Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object or until the specified timeout expires. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait())() Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object. |

## Public Constructors

#### public
**NullCipher**
()

Creates a NullCipher object.