| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| private UpdateOutputStream | |
| private Set | |
| private final Algorithm[] | |
| private byte[] | |
| private final Map | |
| private final int | |
| private OutputCipher | |
| private OutputDecryptor | |
| private OutputEncryptor | |
| private AlgorithmParameters | |
| private final FipsAEADOperatorFactory | |
| private final Class | |
| private final FipsSymmetricOperatorFactory | |
| private final ParametersCreatorProvider | |
| private final BouncyCastleFipsProvider | |
| private final AEADOperatorFactory | |
| private final Class | |
| private final SymmetricOperatorFactory | |
| private final ParametersCreatorProvider | |
| private final int | |
| private String | |
| private String | |
| private PBEParameterSpec | |
| private final DigestAlgorithm | |
| private UpdateOutputStream | |
| private DataArrayOutputStream | |
| private final PBEScheme |
| Access | Constructor and Description |
|---|---|
| private | BaseCipher(BouncyCastleFipsProvider fipsProvider, int blockSizeInBits, int keySizeInBits, DigestAlgorithm prf, PBEScheme scheme, FipsSymmetricOperatorFactory<T extends Parameters> fipsFactory, SymmetricOperatorFactory<T extends Parameters> generalFactory, FipsAEADOperatorFactory<T extends FipsParameters> fipsAeadFactory, AEADOperatorFactory<T extends Parameters> generalAeadFactory, Class<T>[] availableSpecs, ParametersCreatorProvider<T extends Parameters> fipsParametersCreatorProvider, ParametersCreatorProvider<T extends Parameters> generalParametersCreatorProvider, Map<Algorithm, Parameters> baseParametersMap, Algorithm... algorithms)
|
| Modifier and Type | Method and Description |
|---|---|
| protected byte[] | engineDoFinal(byte[]
the input buffer input, int the offset in inputOffset, int input where the input startsthe input length inputLen)Implements abstract javax. |
| protected int | engineDoFinal(byte[]
the input buffer input, int the offset in inputOffset, int input where the input
startsthe input length inputLen, byte[] the buffer for the result output, int the offset in outputOffset)output where the result
is storedImplements abstract javax. |
| protected int | engineGetBlockSize()
Implements abstract javax. |
| protected byte[] | engineGetIV()
Implements abstract javax. |
| protected int | engineGetKeySize(Key
the key object key)Overrides javax. |
| protected int | engineGetOutputSize(int
the input length (in bytes) inputLen)Implements abstract javax. update
or doFinal operation, given the input length
inputLen (in bytes).
|
| protected AlgorithmParameters | engineGetParameters()
Implements abstract javax. |
| protected void | engineInit(int
the operation mode of this opmode, Key CipherSpi object
(this is one of the following:
ENCRYPT_MODE, DECRYPT_MODE,
WRAP_MODE, or UNWRAP_MODE)the encryption key key, AlgorithmParameterSpec the algorithm parameters params, SecureRandom the source of randomness random)Implements abstract javax. CipherSpi object with a key, a set of
algorithm parameters, and a source of randomness.
|
| protected void | engineInit(int
the operation mode of this opmode, Key CipherSpi object
(this is one of the following:
ENCRYPT_MODE, DECRYPT_MODE,
WRAP_MODE, or UNWRAP_MODE)the encryption key key, AlgorithmParameters the algorithm parameters params, SecureRandom the source of randomness random)Implements abstract javax. CipherSpi object with a key, a set of
algorithm parameters, and a source of randomness.
|
| protected void | engineInit(int
the operation mode of this opmode, Key CipherSpi object
(this is one of the following:
ENCRYPT_MODE, DECRYPT_MODE,
WRAP_MODE or UNWRAP_MODE)the encryption key key, SecureRandom the source of randomness random)Implements abstract javax. CipherSpi object with a key and a source
of randomness.
|
| protected void | engineSetMode(String
the cipher mode mode)Implements abstract javax. |
| protected void | engineSetPadding(String
the padding mechanism padding)Implements abstract javax. |
| protected Key | engineUnwrap(byte[]
the key to be unwrapped wrappedKey, String the algorithm associated with the wrapped
key wrappedKeyAlgorithm, int the type of the wrapped key. This is one of
wrappedKeyType)SECRET_KEY, PRIVATE_KEY, or PUBLIC_KEY.Overrides javax. |
| protected byte[] | engineUpdate(byte[]
the input buffer input, int the offset in inputOffset, int input where the input startsthe input length inputLen)Implements abstract javax. CipherSpi object was initialized),
processing another data part.
|
| protected int | engineUpdate(byte[]
the input buffer input, int the offset in inputOffset, int input where the input
startsthe input length inputLen, byte[] the buffer for the result output, int the offset in outputOffset)output where the result
is storedImplements abstract javax. CipherSpi object was initialized),
processing another data part.
|
| protected void | engineUpdateAAD(byte[]
the buffer containing the AAD input, int the offset in offset, int src where the AAD input startsthe number of AAD bytes length)Overrides javax. |
| protected void | engineUpdateAAD(ByteBuffer
the buffer containing the AAD bytebuffer)Overrides javax. |
| protected byte[] | |
| private Algorithm | |
| private static boolean |
| aadStream | back to summary |
|---|---|
| private UpdateOutputStream aadStream | |
| activeAlgorithmSet | back to summary |
|---|---|
| private Set<Algorithm> activeAlgorithmSet | |
| algorithms | back to summary |
|---|---|
| private final Algorithm[] algorithms | |
| associatedData | back to summary |
|---|---|
| private byte[] associatedData | |
| baseParametersMap | back to summary |
|---|---|
| private final Map<Algorithm, Parameters> baseParametersMap | |
| blockSizeInBits | back to summary |
|---|---|
| private final int blockSizeInBits | |
| cipher | back to summary |
|---|---|
| private OutputCipher<Parameters> cipher | |
| decryptor | back to summary |
|---|---|
| private OutputDecryptor<Parameters> decryptor | |
| encryptor | back to summary |
|---|---|
| private OutputEncryptor<Parameters> encryptor | |
| engineParams | back to summary |
|---|---|
| private AlgorithmParameters engineParams | |
| fipsAeadFactory | back to summary |
|---|---|
| private final FipsAEADOperatorFactory<T extends FipsParameters> fipsAeadFactory | |
| fipsAvailableSpecs | back to summary |
|---|---|
| private final Class<T>[] fipsAvailableSpecs | |
| fipsFactory | back to summary |
|---|---|
| private final FipsSymmetricOperatorFactory<T extends Parameters> fipsFactory | |
| fipsParametersProvider | back to summary |
|---|---|
| private final ParametersCreatorProvider<FipsParameters> fipsParametersProvider | |
| fipsProvider | back to summary |
|---|---|
| private final BouncyCastleFipsProvider fipsProvider | |
| generalAeadFactory | back to summary |
|---|---|
| private final AEADOperatorFactory<T extends Parameters> generalAeadFactory | |
| generalAvailableSpecs | back to summary |
|---|---|
| private final Class<T>[] generalAvailableSpecs | |
| generalFactory | back to summary |
|---|---|
| private final SymmetricOperatorFactory<T extends Parameters> generalFactory | |
| generalParametersProvider | back to summary |
|---|---|
| private final ParametersCreatorProvider<Parameters> generalParametersProvider | |
| keySizeInBits | back to summary |
|---|---|
| private final int keySizeInBits | |
| modeName | back to summary |
|---|---|
| private String modeName | |
| pbeAlgorithm | back to summary |
|---|---|
| private String pbeAlgorithm | |
| pbeSpec | back to summary |
|---|---|
| private PBEParameterSpec pbeSpec | |
| prf | back to summary |
|---|---|
| private final DigestAlgorithm prf | |
| processingStream | back to summary |
|---|---|
| private UpdateOutputStream processingStream | |
| resultStream | back to summary |
|---|---|
| private DataArrayOutputStream resultStream | |
| scheme | back to summary |
|---|---|
| private final PBEScheme scheme | |
| BaseCipher | back to summary |
|---|---|
| private BaseCipher(BouncyCastleFipsProvider fipsProvider, int blockSizeInBits, int keySizeInBits, DigestAlgorithm prf, PBEScheme scheme, FipsSymmetricOperatorFactory<T extends Parameters> fipsFactory, SymmetricOperatorFactory<T extends Parameters> generalFactory, FipsAEADOperatorFactory<T extends FipsParameters> fipsAeadFactory, AEADOperatorFactory<T extends Parameters> generalAeadFactory, Class<T>[] availableSpecs, ParametersCreatorProvider<T extends Parameters> fipsParametersCreatorProvider, ParametersCreatorProvider<T extends Parameters> generalParametersCreatorProvider, Map<Algorithm, Parameters> baseParametersMap, Algorithm... algorithms) | |
| engineDoFinal | back to summary |
|---|---|
| protected byte[] engineDoFinal(byte[] input, int inputOffset, int inputLen) throws IllegalBlockSizeException, BadPaddingException Implements abstract javax. Doc from javax. Encrypts or decrypts data in a single-part operation,
or finishes a multiple-part operation.
The data is encrypted or decrypted, depending on how this
The first Upon finishing, this method resets this Note if any exception is thrown, this
| |
| engineDoFinal | back to summary |
|---|---|
| protected int engineDoFinal(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset) throws IllegalBlockSizeException, BadPaddingException, ShortBufferException Implements abstract javax. Doc from javax. Encrypts or decrypts data in a single-part operation,
or finishes a multiple-part operation.
The data is encrypted or decrypted, depending on how this
The first If the Upon finishing, this method resets this Note if any exception is thrown, this
| |
| engineGetBlockSize | back to summary |
|---|---|
| protected int engineGetBlockSize() Implements abstract javax. Doc from javax. Returns the block size (in bytes).
| |
| engineGetIV | back to summary |
|---|---|
| protected byte[] engineGetIV() Implements abstract javax. Doc from javax. Returns the initialization vector (IV) in a new buffer. This is useful in the context of password-based encryption or decryption, where the IV is derived from a user-provided passphrase.
| |
| engineGetKeySize | back to summary |
|---|---|
| protected int engineGetKeySize(Key key) Overrides javax. Doc from javax. Returns the key size of the given key object in bits. This concrete method has been added to this previously-defined
abstract class. It throws an
| |
| engineGetOutputSize | back to summary |
|---|---|
| protected int engineGetOutputSize(int inputLen) Implements abstract javax. Doc from javax. Returns the length in bytes that an output buffer would
need to be in order to hold the result of the next This call takes into account any unprocessed (buffered) data from a
previous The actual output length of the next
| |
| engineGetParameters | back to summary |
|---|---|
| protected AlgorithmParameters engineGetParameters() Implements abstract javax. Doc from javax. Returns the parameters used with this cipher. The returned parameters may be the same that were used to initialize
this cipher, or may contain additional default or random parameter
values used by the underlying cipher implementation. If the required
parameters were not supplied and can be generated by the cipher, the
generated parameters are returned. Otherwise,
| |
| engineInit | back to summary |
|---|---|
| protected void engineInit(int opmode, Key key, AlgorithmParameterSpec params, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException Implements abstract javax. Doc from javax. Initializes this The If this cipher requires any algorithm parameters and
If this cipher requires algorithm parameters that cannot be derived from the input parameters, and there are no reasonable provider-specific default values, initialization will necessarily fail. If this cipher (including its feedback or padding scheme)
requires any random bytes (e.g., for parameter generation), it will get
them from Note that when a
| |
| engineInit | back to summary |
|---|---|
| protected void engineInit(int opmode, Key key, AlgorithmParameters params, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException Implements abstract javax. Doc from javax. Initializes this The If this cipher requires any algorithm parameters and
If this cipher requires algorithm parameters that cannot be derived from the input parameters, and there are no reasonable provider-specific default values, initialization will necessarily fail. If this cipher (including its feedback or padding scheme)
requires any random bytes (e.g., for parameter generation), it will get
them from Note that when a
| |
| engineInit | back to summary |
|---|---|
| protected void engineInit(int opmode, Key key, SecureRandom random) throws InvalidKeyException Implements abstract javax. Doc from javax. Initializes this The If this cipher requires any algorithm parameters that cannot be
derived from the given If this cipher requires algorithm parameters that cannot be derived from the input parameters, and there are no reasonable provider-specific default values, initialization will necessarily fail. If this cipher (including its feedback or padding scheme)
requires any random bytes (e.g., for parameter generation), it will get
them from Note that when a
| |
| engineSetMode | back to summary |
|---|---|
| protected void engineSetMode(String mode) throws NoSuchAlgorithmException Implements abstract javax. Doc from javax. Sets the mode of this cipher.
| |
| engineSetPadding | back to summary |
|---|---|
| protected void engineSetPadding(String padding) throws NoSuchPaddingException Implements abstract javax. Doc from javax. Sets the padding mechanism of this cipher.
| |
| engineUnwrap | back to summary |
|---|---|
| protected Key engineUnwrap(byte[] wrappedKey, String wrappedKeyAlgorithm, int wrappedKeyType) throws InvalidKeyException, NoSuchAlgorithmException Overrides javax. Doc from javax. Unwrap a previously wrapped key. This concrete method has been added to this previously-defined
abstract class. (For backwards compatibility, it cannot be abstract.)
It may be overridden by a provider to unwrap a previously wrapped key.
Such an override is expected to throw an
| |
| engineUpdate | back to summary |
|---|---|
| protected byte[] engineUpdate(byte[] input, int inputOffset, int inputLen) Implements abstract javax. Doc from javax. Continues a multiple-part encryption or decryption operation
(depending on how this The first
| |
| engineUpdate | back to summary |
|---|---|
| protected int engineUpdate(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset) throws ShortBufferException Implements abstract javax. Doc from javax. Continues a multiple-part encryption or decryption operation
(depending on how this The first If the
| |
| engineUpdateAAD | back to summary |
|---|---|
| protected void engineUpdateAAD(byte[] input, int offset, int length) Overrides javax. Doc from javax. Continues a multipart update of the Additional Authentication Data (AAD), using a subset of the provided buffer.
Calls to this method provide AAD to the cipher when operating in
modes such as AEAD (GCM or CCM). If this cipher is operating in
either GCM or CCM mode, all AAD must be supplied before beginning
operations on the ciphertext (via the
| |
| engineUpdateAAD | back to summary |
|---|---|
| protected void engineUpdateAAD(ByteBuffer bytebuffer) Overrides javax. Doc from javax. Continues a multipart update of the Additional Authentication Data (AAD).
Calls to this method provide AAD to the cipher when operating in
modes such as AEAD (GCM or CCM). If this cipher is operating in
either GCM or CCM mode, all AAD must be supplied before beginning
operations on the ciphertext (via the
All
| |
| engineWrap | back to summary |
|---|---|
| protected byte[] engineWrap(Key key) throws IllegalBlockSizeException, InvalidKeyException Overrides javax. Doc from javax. Wrap a key. This concrete method has been added to this previously-defined
abstract class. (For backwards compatibility, it cannot be abstract.)
It may be overridden by a provider to wrap a key.
Such an override is expected to throw an
| |
| getAlgorithm | back to summary |
|---|---|
| private Algorithm getAlgorithm() | |
| isAEADMode | back to summary |
|---|---|
| private static boolean isAEADMode(Algorithm algorithm) | |
| Modifier and Type | Field and Description |
|---|---|
| private final Algorithm[] | |
| private Class | |
| private final Map | |
| private final int | |
| private FipsAEADOperatorFactory | |
| private FipsSymmetricOperatorFactory | |
| private ParametersCreatorProvider | |
| private final BouncyCastleFipsProvider | |
| private AEADOperatorFactory | |
| private SymmetricOperatorFactory | |
| private ParametersCreatorProvider | |
| private int | |
| private DigestAlgorithm | |
| private PBEScheme |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv BaseCipher | |
| pack-priv BaseCipher. | withFipsOperators(ParametersCreatorProvider<T extends Parameters> fipsParametersProvider, FipsSymmetricOperatorFactory<T extends Parameters> fipsFactory)
|
| pack-priv BaseCipher. | withFipsOperators(ParametersCreatorProvider<T extends Parameters> fipsParametersProvider, FipsSymmetricOperatorFactory<T extends Parameters> fipsFactory, FipsAEADOperatorFactory<T extends FipsParameters> fipsAeadFactory)
|
| pack-priv BaseCipher. | |
| pack-priv BaseCipher. | withGeneralOperators(ParametersCreatorProvider<T extends Parameters> generalParametersProvider, SymmetricOperatorFactory<T extends Parameters> generalFactory, AEADOperatorFactory<T extends Parameters> generalAeadFactory)
|
| pack-priv BaseCipher. | |
| pack-priv BaseCipher. | |
| pack-priv BaseCipher. |
| algorithms | back to summary |
|---|---|
| private final Algorithm[] algorithms | |
| availableSpecs | back to summary |
|---|---|
| private Class<T>[] availableSpecs | |
| baseParametersMap | back to summary |
|---|---|
| private final Map<Algorithm, Parameters> baseParametersMap | |
| blockSize | back to summary |
|---|---|
| private final int blockSize | |
| fipsAeadFactory | back to summary |
|---|---|
| private FipsAEADOperatorFactory<T extends FipsParameters> fipsAeadFactory | |
| fipsFactory | back to summary |
|---|---|
| private FipsSymmetricOperatorFactory<T extends Parameters> fipsFactory | |
| fipsParametersProvider | back to summary |
|---|---|
| private ParametersCreatorProvider<T extends Parameters> fipsParametersProvider | |
| fipsProvider | back to summary |
|---|---|
| private final BouncyCastleFipsProvider fipsProvider | |
| generalAeadFactory | back to summary |
|---|---|
| private AEADOperatorFactory<T extends Parameters> generalAeadFactory | |
| generalFactory | back to summary |
|---|---|
| private SymmetricOperatorFactory<T extends Parameters> generalFactory | |
| generalParametersProvider | back to summary |
|---|---|
| private ParametersCreatorProvider<T extends Parameters> generalParametersProvider | |
| keySizeInBits | back to summary |
|---|---|
| private int keySizeInBits | |
| prf | back to summary |
|---|---|
| private DigestAlgorithm prf | |
| scheme | back to summary |
|---|---|
| private PBEScheme scheme | |
| Builder | back to summary |
|---|---|
| pack-priv Builder(BouncyCastleFipsProvider fipsProvider, int blockSize, Parameters... parameters) | |
| build | back to summary |
|---|---|
| pack-priv BaseCipher build() | |
| withFipsOperators | back to summary |
|---|---|
| pack-priv BaseCipher. | |
| withFipsOperators | back to summary |
|---|---|
| pack-priv BaseCipher. | |
| withFixedKeySize | back to summary |
|---|---|
| pack-priv BaseCipher. | |
| withGeneralOperators | back to summary |
|---|---|
| pack-priv BaseCipher. | |
| withParameters | back to summary |
|---|---|
| pack-priv BaseCipher. | |
| withPrf | back to summary |
|---|---|
| pack-priv BaseCipher. | |
| withScheme | back to summary |
|---|---|
| pack-priv BaseCipher. | |