Class BcCMSContentEncryptorBuilder


  • public class BcCMSContentEncryptorBuilder
    extends java.lang.Object
    • Constructor Detail

      • BcCMSContentEncryptorBuilder

        public BcCMSContentEncryptorBuilder​(org.bouncycastle.asn1.ASN1ObjectIdentifier encryptionOID)
      • BcCMSContentEncryptorBuilder

        public BcCMSContentEncryptorBuilder​(org.bouncycastle.asn1.ASN1ObjectIdentifier encryptionOID,
                                            int keySize)
    • Method Detail

      • build

        public OutputEncryptor build()
                              throws CMSException
        Build the OutputEncryptor with an internally generated key.
        Returns:
        an OutputEncryptor configured to use an internal key.
        Throws:
        CMSException
      • build

        public OutputEncryptor build​(byte[] rawEncKey)
                              throws CMSException
        Build the OutputEncryptor using a pre-generated key.
        Parameters:
        rawEncKey - a raw byte encoding of the key to be used for encryption.
        Returns:
        an OutputEncryptor configured to use rawEncKey.
        Throws:
        CMSException