Top Constructors Methods
org.bouncycastle.openpgp.operator.bc

public Class BcUtil

extends Object
Class Inheritance
Imports
java.io.InputStream, java.math.BigInteger, org.bouncycastle.asn1.ASN1ObjectIdentifier, org.bouncycastle.asn1.cryptlib.CryptlibObjectIdentifiers, org.bouncycastle.asn1.edec.EdECObjectIdentifiers, org.bouncycastle.asn1.x9.ECNamedCurveTable, .X9ECParameters, org.bouncycastle.bcpg.AEADEncDataPacket, .SymmetricEncIntegrityPacket, org.bouncycastle.crypto.BlockCipher, .BufferedBlockCipher, .DefaultBufferedBlockCipher, .InvalidCipherTextException, .RawAgreement, org.bouncycastle.crypto.ec.CustomNamedCurves, org.bouncycastle.crypto.io.CipherInputStream, org.bouncycastle.crypto.modes.CFBBlockCipher, .OpenPGPCFBBlockCipher, org.bouncycastle.crypto.params.AsymmetricKeyParameter, .KeyParameter, .ParametersWithIV, org.bouncycastle.math.ec.ECCurve, .ECPoint, org.bouncycastle.openpgp.PGPSessionKey, org.bouncycastle.openpgp.operator.PGPDataDecryptor, .PGPDigestCalculator, org.bouncycastle.util.BigIntegers

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static PGPDataDecryptor

Returns:

decryptor
createDataDecryptor
(boolean
if true, the data is contained in a SEIPD v1 packet, if false it is contained in a SED packet.
withIntegrityPacket
,
BlockCipher
decryption engine
engine
,
byte[]
decryption key
key
)

Create a new OpenPGP v4 data decryptor.

pack-priv static BufferedBlockCipher
createStreamCipher(boolean forEncryption, BlockCipher engine, boolean withIntegrityPacket, byte[] key)

public static BufferedBlockCipher
createSymmetricKeyWrapper(boolean forEncryption, BlockCipher engine, byte[] key, byte[] iv)

pack-priv static ECPoint
decodePoint(BigInteger encodedPoint, ECCurve curve)

pack-priv static byte[]
pack-priv static X9ECParameters
pack-priv static boolean
pack-priv static byte[]
processBufferedBlockCipher(boolean forEncryption, BlockCipher engine, byte[] key, byte[] iv, byte[] msg, int msgOff, int msgLen)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

BcUtilback to summary
public BcUtil()

Method Detail

createDataDecryptorback to summary
public static PGPDataDecryptor createDataDecryptor(boolean withIntegrityPacket, 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:boolean

if true, the data is contained in a SEIPD v1 packet, if false it is contained in a SED packet.

engine:BlockCipher

decryption engine

key:byte[]

decryption key

Returns:PGPDataDecryptor

decryptor

createStreamCipherback to summary
pack-priv static BufferedBlockCipher createStreamCipher(boolean forEncryption, BlockCipher engine, boolean withIntegrityPacket, byte[] key)
createSymmetricKeyWrapperback to summary
public static BufferedBlockCipher createSymmetricKeyWrapper(boolean forEncryption, BlockCipher engine, byte[] key, byte[] iv)
decodePointback to summary
pack-priv static ECPoint decodePoint(BigInteger encodedPoint, ECCurve curve)
getSecretback to summary
pack-priv static byte[] getSecret(RawAgreement agreement, AsymmetricKeyParameter privKey, AsymmetricKeyParameter ephPub)
getX9Parametersback to summary
pack-priv static X9ECParameters getX9Parameters(ASN1ObjectIdentifier curveOID)
isX25519back to summary
pack-priv static boolean isX25519(ASN1ObjectIdentifier curveID)
processBufferedBlockCipherback to summary
pack-priv static byte[] processBufferedBlockCipher(boolean forEncryption, BlockCipher engine, byte[] key, byte[] iv, byte[] msg, int msgOff, int msgLen) throws InvalidCipherTextException