All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.spongycastle.openpgp.operator.PGPDataDecryptorFactory Maven / Gradle / Ivy

Go to download

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.SymmetricKeyAlgorithmTags;
import org.spongycastle.openpgp.PGPException;

/**
 * Base interface of factories for {@link PGPDataDecryptor}.
 */
public interface PGPDataDecryptorFactory
{
    /**
     * Constructs a data decryptor.
     *
     * @param withIntegrityPacket true if the packet to be decrypted has integrity
     *            checking enabled.
     * @param encAlgorithm the identifier of the {@link SymmetricKeyAlgorithmTags encryption
     *            algorithm} to decrypt with.
     * @param key the bytes of the key for the cipher.
     * @return a data decryptor that can decrypt (and verify) streams of encrypted data.
     * @throws PGPException if an error occurs initialising the decryption and integrity checking
     *             functions.
     */
    public PGPDataDecryptor createDataDecryptor(boolean withIntegrityPacket, int encAlgorithm, byte[] key)
        throws PGPException;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy