| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| private Set | |
| private final Algorithm[] | |
| private Parameters | |
| private final Class | |
| private final Map | |
| private DataArrayOutputStream | |
| private SingleBlockCipher | |
| private AlgorithmParameters | |
| private final FipsKeyWrapOperatorFactory | |
| private final BouncyCastleFipsProvider | |
| private final AsymmetricOperatorFactory | |
| private final KeyWrapOperatorFactory | |
| private KeyUnwrapper | |
| private KeyWrapper | |
| private final ParametersCreatorProvider | |
| private AlgorithmParameterSpec | |
| private final PrivateKeyConverter | |
| private boolean | |
| private final PublicKeyConverter | |
| private boolean | |
| private static final Class | |
| private final boolean |
| Access | Constructor and Description |
|---|---|
| public | BaseSingleBlockCipher(BouncyCastleFipsProvider fipsProvider, boolean publicKeyOnly, boolean privateKeyOnly, boolean wrapModeOnly, Class<T>[] availableSpecs, AsymmetricOperatorFactory<T extends Parameters> generalFactory, FipsKeyWrapOperatorFactory<T extends Parameters, K extends Key> fipsKeyWrapOperatorFactory, KeyWrapOperatorFactory<T extends Parameters, K extends Key> generalKeyWrapOperatorFactory, PublicKeyConverter<T extends AsymmetricPublicKey> publicKeyConverter, PrivateKeyConverter<T extends AsymmetricPrivateKey> privateKeyConverter, ParametersCreatorProvider<T extends Parameters> parametersCreatorProvider, Map<Algorithm, Parameters> baseParametersMap, Algorithm... algorithms)
|
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| 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, final 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 byte[] | |
| private byte[] | |
| private void |
| activeAlgorithmSet | back to summary |
|---|---|
| private Set<Algorithm> activeAlgorithmSet | |
| algorithms | back to summary |
|---|---|
| private final Algorithm[] algorithms | |
| algParameters | back to summary |
|---|---|
| private Parameters algParameters | |
| availableSpecs | back to summary |
|---|---|
| private final Class<T>[] availableSpecs | |
| baseParametersMap | back to summary |
|---|---|
| private final Map<Algorithm, Parameters> baseParametersMap | |
| bOut | back to summary |
|---|---|
| private DataArrayOutputStream bOut | |
| cipher | back to summary |
|---|---|
| private SingleBlockCipher<T extends Parameters> cipher | |
| engineParams | back to summary |
|---|---|
| private AlgorithmParameters engineParams | |
| fipsKeyWrapOperatorFactory | back to summary |
|---|---|
| private final FipsKeyWrapOperatorFactory<T extends Parameters, K extends Key> fipsKeyWrapOperatorFactory | |
| fipsProvider | back to summary |
|---|---|
| private final BouncyCastleFipsProvider fipsProvider | |
| generalFactory | back to summary |
|---|---|
| private final AsymmetricOperatorFactory<T extends Parameters> generalFactory | |
| generalKeyWrapOperatorFactory | back to summary |
|---|---|
| private final KeyWrapOperatorFactory<T extends Parameters, K extends Key> generalKeyWrapOperatorFactory | |
| keyUnwrapper | back to summary |
|---|---|
| private KeyUnwrapper<T extends Parameters> keyUnwrapper | |
| keyWrapper | back to summary |
|---|---|
| private KeyWrapper<T extends Parameters> keyWrapper | |
| parametersCreatorProvider | back to summary |
|---|---|
| private final ParametersCreatorProvider<T extends Parameters> parametersCreatorProvider | |
| paramSpec | back to summary |
|---|---|
| private AlgorithmParameterSpec paramSpec | |
| privateKeyConverter | back to summary |
|---|---|
| private final PrivateKeyConverter<T extends AsymmetricPrivateKey> privateKeyConverter | |
| privateKeyOnly | back to summary |
|---|---|
| private boolean privateKeyOnly | |
| publicKeyConverter | back to summary |
|---|---|
| private final PublicKeyConverter<T extends AsymmetricPublicKey> publicKeyConverter | |
| publicKeyOnly | back to summary |
|---|---|
| private boolean publicKeyOnly | |
| TlsRsaPremasterSecretParameterSpec | back to summary |
|---|---|
| private static final Class<T> TlsRsaPremasterSecretParameterSpec | |
| wrapModeOnly | back to summary |
|---|---|
| private final boolean wrapModeOnly | |
| BaseSingleBlockCipher | back to summary |
|---|---|
| public BaseSingleBlockCipher(BouncyCastleFipsProvider fipsProvider, boolean publicKeyOnly, boolean privateKeyOnly, boolean wrapModeOnly, Class<T>[] availableSpecs, AsymmetricOperatorFactory<T extends Parameters> generalFactory, FipsKeyWrapOperatorFactory<T extends Parameters, K extends Key> fipsKeyWrapOperatorFactory, KeyWrapOperatorFactory<T extends Parameters, K extends Key> generalKeyWrapOperatorFactory, PublicKeyConverter<T extends AsymmetricPublicKey> publicKeyConverter, PrivateKeyConverter<T extends AsymmetricPrivateKey> privateKeyConverter, ParametersCreatorProvider<T extends Parameters> parametersCreatorProvider, Map<Algorithm, Parameters> baseParametersMap, Algorithm... algorithms) | |
| checkBufferSize | back to summary |
|---|---|
| private void checkBufferSize() | |
| 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, final 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) Implements abstract javax. Doc from javax. Continues a multiple-part encryption or decryption operation
(depending on how this The first If the
| |
| 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
| |
| getOutput | back to summary |
|---|---|
| private byte[] getOutput() throws BadPaddingException, IllegalBlockSizeException | |
| initFromSpec | back to summary |
|---|---|
| private void initFromSpec(Set<Algorithm> currentAlgs, OAEPParameterSpec pSpec) throws NoSuchPaddingException | |
| Modifier and Type | Field and Description |
|---|---|
| private Throwable |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Throwable | getCause()
Overrides java. null if the
cause is nonexistent or unknown.
|
| cause | back to summary |
|---|---|
| private Throwable cause Hides java. | |
| BadBlockException | back to summary |
|---|---|
| public BadBlockException(String msg, Throwable cause) | |
| getCause | back to summary |
|---|---|
| public Throwable getCause() Overrides java. Doc from java. Returns the cause of this throwable or This implementation returns the cause that was supplied via one of
the constructors requiring a
| |
| Modifier and Type | Field and Description |
|---|---|
| private final Algorithm[] | |
| private Class | |
| private final Map | |
| private FipsKeyWrapOperatorFactory | |
| private final BouncyCastleFipsProvider | |
| private AsymmetricOperatorFactory | |
| private KeyWrapOperatorFactory | |
| private ParametersCreatorProvider | |
| private PrivateKeyConverter | |
| private boolean | |
| private PublicKeyConverter | |
| private boolean | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv BaseSingleBlockCipher | |
| pack-priv BaseSingleBlockCipher. | |
| pack-priv BaseSingleBlockCipher. | |
| pack-priv BaseSingleBlockCipher. | |
| pack-priv BaseSingleBlockCipher. | withFipsOperators(AsymmetricOperatorFactory<T extends Parameters> generalFactory, FipsKeyWrapOperatorFactory<T extends Parameters, K extends Key> fipsKeyWrapOperatorFactory)
|
| pack-priv BaseSingleBlockCipher. | withGeneralOperators(AsymmetricOperatorFactory<T extends Parameters> generalFactory, KeyWrapOperatorFactory<T extends Parameters, K extends Key> generalKeyWrapOperatorFactory)
|
| pack-priv BaseSingleBlockCipher. | |
| pack-priv BaseSingleBlockCipher. | withParametersCreatorProvider(ParametersCreatorProvider<T extends Parameters> parametersCreatorProvider)
|
| pack-priv BaseSingleBlockCipher. | |
| pack-priv BaseSingleBlockCipher. |
| 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 | |
| fipsKeyWrapOperatorFactory | back to summary |
|---|---|
| private FipsKeyWrapOperatorFactory<T extends Parameters, K extends Key> fipsKeyWrapOperatorFactory | |
| fipsProvider | back to summary |
|---|---|
| private final BouncyCastleFipsProvider fipsProvider | |
| generalFactory | back to summary |
|---|---|
| private AsymmetricOperatorFactory<T extends Parameters> generalFactory | |
| generalKeyWrapOperatorFactory | back to summary |
|---|---|
| private KeyWrapOperatorFactory<T extends Parameters, K extends Key> generalKeyWrapOperatorFactory | |
| parametersCreatorProvider | back to summary |
|---|---|
| private ParametersCreatorProvider<T extends Parameters> parametersCreatorProvider | |
| privateKeyConverter | back to summary |
|---|---|
| private PrivateKeyConverter<T extends AsymmetricPrivateKey> privateKeyConverter | |
| privateKeyOnly | back to summary |
|---|---|
| private boolean privateKeyOnly | |
| publicKeyConverter | back to summary |
|---|---|
| private PublicKeyConverter<T extends AsymmetricPublicKey> publicKeyConverter | |
| publicKeyOnly | back to summary |
|---|---|
| private boolean publicKeyOnly | |
| wrapModeOnly | back to summary |
|---|---|
| private boolean wrapModeOnly | |
| Builder | back to summary |
|---|---|
| pack-priv Builder(BouncyCastleFipsProvider fipsProvider, Algorithm... algorithms) | |
| Builder | back to summary |
|---|---|
| pack-priv Builder(BouncyCastleFipsProvider fipsProvider, Parameters... parameters) | |
| build | back to summary |
|---|---|
| pack-priv BaseSingleBlockCipher build() | |
| setPrivateKeyOnly | back to summary |
|---|---|
| pack-priv BaseSingleBlockCipher. | |
| setPublicKeyOnly | back to summary |
|---|---|
| pack-priv BaseSingleBlockCipher. | |
| setWrapModeOnly | back to summary |
|---|---|
| pack-priv BaseSingleBlockCipher. | |
| withFipsOperators | back to summary |
|---|---|
| pack-priv BaseSingleBlockCipher. | |
| withGeneralOperators | back to summary |
|---|---|
| pack-priv BaseSingleBlockCipher. | |
| withParameters | back to summary |
|---|---|
| pack-priv BaseSingleBlockCipher. | |
| withParametersCreatorProvider | back to summary |
|---|---|
| pack-priv BaseSingleBlockCipher. | |
| withPrivateKeyConverter | back to summary |
|---|---|
| pack-priv BaseSingleBlockCipher. | |
| withPublicKeyConverter | back to summary |
|---|---|
| pack-priv BaseSingleBlockCipher. | |