Class BcUtil


  • public class BcUtil
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      BcUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static PGPDataDecryptor createDataDecryptor​(boolean withIntegrityPacket, org.bouncycastle.crypto.BlockCipher engine, byte[] key)
      Create a new OpenPGP v4 data decryptor.
      static org.bouncycastle.crypto.BufferedBlockCipher createSymmetricKeyWrapper​(boolean forEncryption, org.bouncycastle.crypto.BlockCipher engine, byte[] key, byte[] iv)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BcUtil

        public BcUtil()
    • Method Detail

      • createDataDecryptor

        public static PGPDataDecryptor createDataDecryptor​(boolean withIntegrityPacket,
                                                           org.bouncycastle.crypto.BlockCipher engine,
                                                           byte[] key)
        Create a new OpenPGP v4 data decryptor. This decryptor can handle Symmetrically Encrypted Data (SED) and v1 Symmetrically Encrypted Integrity-Protected Data (SEIPD) packets. For AEAD packets, see BcAEADUtil.createOpenPgpV5DataDecryptor(AEADEncDataPacket, PGPSessionKey) and BcAEADUtil.createOpenPgpV6DataDecryptor(SymmetricEncIntegrityPacket, PGPSessionKey).
        Parameters:
        withIntegrityPacket - if true, the data is contained in a SEIPD v1 packet, if false it is contained in a SED packet.
        engine - decryption engine
        key - decryption key
        Returns:
        decryptor
      • createSymmetricKeyWrapper

        public static org.bouncycastle.crypto.BufferedBlockCipher createSymmetricKeyWrapper​(boolean forEncryption,
                                                                                            org.bouncycastle.crypto.BlockCipher engine,
                                                                                            byte[] key,
                                                                                            byte[] iv)