Class BcUtil
- java.lang.Object
-
- org.bouncycastle.openpgp.operator.bc.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)
-
-
-
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, seeBcAEADUtil.createOpenPgpV5DataDecryptor(AEADEncDataPacket, PGPSessionKey)
andBcAEADUtil.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 enginekey
- decryption key- Returns:
- decryptor
-
createSymmetricKeyWrapper
public static org.bouncycastle.crypto.BufferedBlockCipher createSymmetricKeyWrapper(boolean forEncryption, org.bouncycastle.crypto.BlockCipher engine, byte[] key, byte[] iv)
-
-