Java javax.crypto Cipher fields, constructors, methods, implement or subclass

Example usage for Java javax.crypto Cipher fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for javax.crypto Cipher.

The text is from its open source code.

Subclass

javax.crypto.Cipher has subclasses.
Click this link to see all its subclasses.

Implementation

javax.crypto.Cipher has the following implementations.
Click this link to see all its implementation.

Field

intENCRYPT_MODE
Constant used to initialize cipher to encryption mode.
intDECRYPT_MODE
Constant used to initialize cipher to decryption mode.
intWRAP_MODE
Constant used to initialize cipher to key-wrapping mode.
intUNWRAP_MODE
Constant used to initialize cipher to key-unwrapping mode.
intPUBLIC_KEY
Constant used to indicate the to-be-unwrapped key is a "public key".
intPRIVATE_KEY
Constant used to indicate the to-be-unwrapped key is a "private key".
intSECRET_KEY
Constant used to indicate the to-be-unwrapped key is a "secret key".

Method

byte[]doFinal(byte[] input)
Encrypts or decrypts data in a single-part operation, or finishes a multiple-part operation.
byte[]doFinal()
Finishes a multiple-part encryption or decryption operation, depending on how this cipher was initialized.
intdoFinal(byte[] output, int outputOffset)
Finishes a multiple-part encryption or decryption operation, depending on how this cipher was initialized.
intdoFinal(ByteBuffer input, ByteBuffer output)
Encrypts or decrypts data in a single-part operation, or finishes a multiple-part operation.
intdoFinal(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.
byte[]doFinal(byte[] input, int inputOffset, int inputLen)
Encrypts or decrypts data in a single-part operation, or finishes a multiple-part operation.
StringgetAlgorithm()
Returns the algorithm name of this Cipher object.
intgetBlockSize()
Returns the block size (in bytes).
ClassgetClass()
Returns the runtime class of this Object .
CiphergetInstance(String transformation)
Returns a Cipher object that implements the specified transformation.
CiphergetInstance(String transformation, String provider)
Returns a Cipher object that implements the specified transformation.
CiphergetInstance(String transformation, Provider provider)
Returns a Cipher object that implements the specified transformation.
byte[]getIV()
Returns the initialization vector (IV) in a new buffer.
intgetMaxAllowedKeyLength(String transformation)
Returns the maximum key length for the specified transformation according to the installed JCE jurisdiction policy files.
AlgorithmParameterSpecgetMaxAllowedParameterSpec(String transformation)
Returns an AlgorithmParameterSpec object which contains the maximum cipher parameter value according to the jurisdiction policy file.
intgetOutputSize(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).
AlgorithmParametersgetParameters()
Returns the parameters used with this cipher.
ProvidergetProvider()
Returns the provider of this Cipher object.
voidinit(int opmode, Key key)
Initializes this cipher with a key.
voidinit(int opmode, Certificate certificate)
Initializes this cipher with the public key from the given certificate.
voidinit(int opmode, Key key, SecureRandom random)
Initializes this cipher with a key and a source of randomness.
voidinit(int opmode, Key key, AlgorithmParameterSpec params)
Initializes this cipher with a key and a set of algorithm parameters.
voidinit(int opmode, Key key, AlgorithmParameters params)
Initializes this cipher with a key and a set of algorithm parameters.
voidinit(int opmode, Certificate certificate, SecureRandom random)
Initializes this cipher with the public key from the given certificate and a source of randomness.
Keyunwrap(byte[] wrappedKey, String wrappedKeyAlgorithm, int wrappedKeyType)
Unwrap a previously wrapped key.
intupdate(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.
intupdate(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.
byte[]update(byte[] input)
Continues a multiple-part encryption or decryption operation (depending on how this cipher was initialized), processing another data part.
byte[]update(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.
byte[]wrap(Key key)
Wrap a key.