| Modifier and Type | Class and Description |
|---|---|
| private class | |
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private AlgorithmIdentifier | |
| private AlgorithmParameters | |
| private final ASN1ObjectIdentifier | |
| private EnvelopedDataHelper | |
| private static final SecretKeySizeProvider | |
| private final int | |
| private SecureRandom |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | JceCMSContentEncryptorBuilder(AlgorithmIdentifier
the full algorithm identifier for the encryption. encryptionAlgId)Constructor for a content encryptor builder based on an algorithm identifier and its contained parameters. |
| Modifier and Type | Method and Description |
|---|---|
| public OutputEncryptor | |
| private static boolean | |
| private static SecureRandom | Returns: the SecureRandom parameter if it is not null, or else the default SecureRandomthe SecureRandom to use if it is not null. secureRandom)Return either the passed-in SecureRandom, or if it is null, then the default source of randomness. |
| public JceCMSContentEncryptorBuilder | Returns: the current builder instance.algorithmParameters for content encryption. algorithmParameters)Provide a set of algorithm parameters for the content encryption cipher to use. |
| public JceCMSContentEncryptorBuilder | Returns: the current builder instance.the provider object to use for cipher and default parameters creation. provider)Set the provider to use for content encryption. |
| public JceCMSContentEncryptorBuilder | Returns: the current builder instance.the name of the provider to use for cipher and default parameters creation. providerName)Set the provider to use for content encryption (by name) |
| public JceCMSContentEncryptorBuilder | Returns: the current builder instance.the secure random to use. random)Provide a specified source of randomness to be used for session key and IV/nonce generation. |
| algorithmIdentifier | back to summary |
|---|---|
| private AlgorithmIdentifier algorithmIdentifier | |
| algorithmParameters | back to summary |
|---|---|
| private AlgorithmParameters algorithmParameters | |
| encryptionOID | back to summary |
|---|---|
| private final ASN1ObjectIdentifier encryptionOID | |
| helper | back to summary |
|---|---|
| private EnvelopedDataHelper helper | |
| KEY_SIZE_PROVIDER | back to summary |
|---|---|
| private static final SecretKeySizeProvider KEY_SIZE_PROVIDER | |
| keySize | back to summary |
|---|---|
| private final int keySize | |
| random | back to summary |
|---|---|
| private SecureRandom random | |
| JceCMSContentEncryptorBuilder | back to summary |
|---|---|
| public JceCMSContentEncryptorBuilder(ASN1ObjectIdentifier encryptionOID) | |
| JceCMSContentEncryptorBuilder | back to summary |
|---|---|
| public JceCMSContentEncryptorBuilder(ASN1ObjectIdentifier encryptionOID, int keySize) | |
| JceCMSContentEncryptorBuilder | back to summary |
|---|---|
| public JceCMSContentEncryptorBuilder(AlgorithmIdentifier encryptionAlgId) Constructor for a content encryptor builder based on an algorithm identifier and its contained parameters.
| |
| build | back to summary |
|---|---|
| public OutputEncryptor build() throws CMSException | |
| checkForAEAD | back to summary |
|---|---|
| private static boolean checkForAEAD() | |
| getSecureRandom | back to summary |
|---|---|
| private static SecureRandom getSecureRandom(SecureRandom secureRandom) Return either the passed-in SecureRandom, or if it is null, then the default source of randomness.
| |
| setAlgorithmParameters | back to summary |
|---|---|
| public JceCMSContentEncryptorBuilder setAlgorithmParameters(AlgorithmParameters algorithmParameters) Provide a set of algorithm parameters for the content encryption cipher to use.
| |
| setProvider | back to summary |
|---|---|
| public JceCMSContentEncryptorBuilder setProvider(Provider provider) Set the provider to use for content encryption.
| |
| setProvider | back to summary |
|---|---|
| public JceCMSContentEncryptorBuilder setProvider(String providerName) Set the provider to use for content encryption (by name)
| |
| setSecureRandom | back to summary |
|---|---|
| public JceCMSContentEncryptorBuilder setSecureRandom(SecureRandom random) Provide a specified source of randomness to be used for session key and IV/nonce generation.
| |
| Modifier and Type | Field and Description |
|---|---|
| private AlgorithmIdentifier | |
| private Cipher | |
| private SecretKey | |
| private MacCaptureStream |
| Access | Constructor and Description |
|---|---|
| pack-priv | CMSAuthOutputEncryptor(ASN1ObjectIdentifier encryptionOID, int keySize, AlgorithmParameters params, SecureRandom random)
|
| Modifier and Type | Method and Description |
|---|---|
| public OutputStream | getAADStream()
Implements org. |
| public AlgorithmIdentifier | getAlgorithmIdentifier()
Implements org. |
| public GenericKey | getKey()
Implements org. |
| public byte[] | getMAC()
Implements org. |
| public OutputStream | getOutputStream(OutputStream
output stream for encrypted output. dOut)Implements org. |
| algorithmIdentifier | back to summary |
|---|---|
| private AlgorithmIdentifier algorithmIdentifier | |
| cipher | back to summary |
|---|---|
| private Cipher cipher | |
| encKey | back to summary |
|---|---|
| private SecretKey encKey | |
| macOut | back to summary |
|---|---|
| private MacCaptureStream macOut | |
| CMSAuthOutputEncryptor | back to summary |
|---|---|
| pack-priv CMSAuthOutputEncryptor(ASN1ObjectIdentifier encryptionOID, int keySize, AlgorithmParameters params, SecureRandom random) throws CMSException | |
| getAADStream | back to summary |
|---|---|
| public OutputStream getAADStream() Implements org. Doc from org. Return a stream to write associated data to in order to have it incorporated into the AEAD cipher's MAC.
| |
| getAlgorithmIdentifier | back to summary |
|---|---|
| public AlgorithmIdentifier getAlgorithmIdentifier() Implements org. Doc from org. Return the algorithm identifier describing the encryption algorithm and parameters this encryptor uses.
| |
| getKey | back to summary |
|---|---|
| public GenericKey getKey() Implements org. Doc from org. Return the key used for encrypting the output.
| |
| getMAC | back to summary |
|---|---|
| public byte[] getMAC() Implements org. Doc from org. Return the final value of AEAD cipher's MAC.
| |
| getOutputStream | back to summary |
|---|---|
| public OutputStream getOutputStream(OutputStream dOut) Implements org. Doc from org. Wrap the passed in output stream encOut, returning an output stream that encrypts anything passed in before sending on to encOut.
| |
| Modifier and Type | Field and Description |
|---|---|
| private AlgorithmIdentifier | |
| private Cipher | |
| private SecretKey |
| Access | Constructor and Description |
|---|---|
| pack-priv | CMSOutputEncryptor(ASN1ObjectIdentifier encryptionOID, int keySize, AlgorithmParameters params, SecureRandom random)
|
| Modifier and Type | Method and Description |
|---|---|
| public AlgorithmIdentifier | getAlgorithmIdentifier()
Implements org. |
| public GenericKey | getKey()
Implements org. |
| public OutputStream | getOutputStream(OutputStream
output stream for encrypted output. dOut)Implements org. |
| algorithmIdentifier | back to summary |
|---|---|
| private AlgorithmIdentifier algorithmIdentifier | |
| cipher | back to summary |
|---|---|
| private Cipher cipher | |
| encKey | back to summary |
|---|---|
| private SecretKey encKey | |
| CMSOutputEncryptor | back to summary |
|---|---|
| pack-priv CMSOutputEncryptor(ASN1ObjectIdentifier encryptionOID, int keySize, AlgorithmParameters params, SecureRandom random) throws CMSException | |
| getAlgorithmIdentifier | back to summary |
|---|---|
| public AlgorithmIdentifier getAlgorithmIdentifier() Implements org. Doc from org. Return the algorithm identifier describing the encryption algorithm and parameters this encryptor uses.
| |
| getKey | back to summary |
|---|---|
| public GenericKey getKey() Implements org. Doc from org. Return the key used for encrypting the output.
| |
| getOutputStream | back to summary |
|---|---|
| public OutputStream getOutputStream(OutputStream dOut) Implements org. Doc from org. Wrap the passed in output stream encOut, returning an output stream that encrypts anything passed in before sending on to encOut.
| |