001// SPDX-FileCopyrightText: 2021 Paul Schaub <vanitasvitae@fsfe.org>
002//
003// SPDX-License-Identifier: Apache-2.0
004
005package org.pgpainless.decryption_verification;
006
007/**
008 * Strategy defining how missing secret key passphrases are handled.
009 */
010public enum MissingKeyPassphraseStrategy {
011    /**
012     * Try to interactively obtain key passphrases one-by-one via callbacks,
013     * eg {@link org.pgpainless.key.protection.passphrase_provider.SecretKeyPassphraseProvider}.
014     */
015    INTERACTIVE,
016    /**
017     * Do not try to obtain passphrases interactively and instead throw a
018     * {@link org.pgpainless.exception.MissingPassphraseException} listing all keys with missing passphrases.
019     */
020    THROW_EXCEPTION
021}