org.spongycastle.openpgp.operator.PGPKeyEncryptionMethodGenerator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bcpg-jdk15on Show documentation
Show all versions of bcpg-jdk15on Show documentation
Spongy Castle is a package-rename (org.bouncycastle.* to org.spongycastle.*) of Bouncy Castle
intended for the Android platform. Android unfortunately ships with a stripped-down version of
Bouncy Castle, which prevents easy upgrades - Spongy Castle overcomes this and provides a full,
up-to-date version of the Bouncy Castle cryptographic libs.
The newest version!
package org.spongycastle.openpgp.operator;
import org.spongycastle.bcpg.ContainedPacket;
import org.spongycastle.bcpg.SymmetricKeyAlgorithmTags;
import org.spongycastle.openpgp.PGPEncryptedDataGenerator;
import org.spongycastle.openpgp.PGPException;
/**
* An encryption method that can be applied to encrypt data in a {@link PGPEncryptedDataGenerator}.
*/
public abstract class PGPKeyEncryptionMethodGenerator
{
/**
* Generates a packet encoding the details of this encryption method.
*
* @param encAlgorithm the {@link SymmetricKeyAlgorithmTags encryption algorithm} being used
* @param sessionInfo session data generated by the encrypted data generator.
* @return a packet encoding the provided information and the configuration of this instance.
* @throws PGPException if an error occurs constructing the packet.
*/
public abstract ContainedPacket generate(int encAlgorithm, byte[] sessionInfo)
throws PGPException;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy