Class BcUtil

java.lang.Object
org.bouncycastle.openpgp.operator.bc.BcUtil

public class BcUtil extends Object
  • Constructor Details

    • BcUtil

      public BcUtil()
  • Method Details

    • 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)