2021-10-18 16:01:19 +02:00
|
|
|
// SPDX-FileCopyrightText: 2021 Paul Schaub <vanitasvitae@fsfe.org>
|
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
package org.pgpainless.decryption_verification;
|
|
|
|
|
2021-10-18 16:19:12 +02:00
|
|
|
/**
|
|
|
|
* Strategy defining how missing secret key passphrases are handled.
|
|
|
|
*/
|
2021-10-18 16:01:19 +02:00
|
|
|
public enum MissingKeyPassphraseStrategy {
|
2021-10-18 16:19:12 +02:00
|
|
|
/**
|
|
|
|
* Try to interactively obtain key passphrases one-by-one via callbacks,
|
|
|
|
* eg {@link org.pgpainless.key.protection.passphrase_provider.SecretKeyPassphraseProvider}.
|
|
|
|
*/
|
|
|
|
INTERACTIVE,
|
|
|
|
/**
|
|
|
|
* Do not try to obtain passphrases interactively and instead throw a
|
|
|
|
* {@link org.pgpainless.exception.MissingPassphraseException} listing all keys with missing passphrases.
|
|
|
|
*/
|
|
|
|
THROW_EXCEPTION
|
2021-10-18 16:01:19 +02:00
|
|
|
}
|