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

org.bouncycastle.openpgp.operator.AEADSecretKeyEncryptorBuilder Maven / Gradle / Ivy

Go to download

The Bouncy Castle Java API for handling the OpenPGP protocol. This jar contains the OpenPGP API for JDK 1.5 to JDK 1.8. The APIs can be used in conjunction with a JCE/JCA provider such as the one provided with the Bouncy Castle Cryptography APIs.

The newest version!
package org.bouncycastle.openpgp.operator;

import org.bouncycastle.bcpg.PublicKeyPacket;

/**
 * Implementation provider for AEAD-based {@link PBESecretKeyEncryptor PBESecretKeyEncryptors}.
 */
public interface AEADSecretKeyEncryptorBuilder
{
    /**
     * Build a new {@link PBESecretKeyEncryptor} using the given passphrase.
     * Note: As the AEAD protection mechanism includes the public key packet of the key into the calculation,
     * if the key you want to protect is supposed to be a subkey, you need to convert it to one before
     * calling this method. See {@link org.bouncycastle.openpgp.PGPKeyPair#asSubkey(KeyFingerPrintCalculator)}.
     *
     * @param passphrase passphrase
     * @param pubKey public primary or subkey packet
     * @return encryptor using AEAD
     */
    PBESecretKeyEncryptor build(char[] passphrase, final PublicKeyPacket pubKey);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy