1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-12-23 03:17:58 +01:00

Kotlin conversion: MissingKeyPassphraseStrategy

This commit is contained in:
Paul Schaub 2023-09-06 14:50:31 +02:00
parent 1234c8800a
commit 6e653f3c92
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
2 changed files with 22 additions and 21 deletions

View file

@ -1,21 +0,0 @@
// SPDX-FileCopyrightText: 2021 Paul Schaub <vanitasvitae@fsfe.org>
//
// SPDX-License-Identifier: Apache-2.0
package org.pgpainless.decryption_verification;
/**
* Strategy defining how missing secret key passphrases are handled.
*/
public enum MissingKeyPassphraseStrategy {
/**
* 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
}

View file

@ -0,0 +1,22 @@
// SPDX-FileCopyrightText: 2023 Paul Schaub <vanitasvitae@fsfe.org>
//
// SPDX-License-Identifier: Apache-2.0
package org.pgpainless.decryption_verification
/**
* Strategy defining how missing secret key passphrases are handled.
*/
enum class MissingKeyPassphraseStrategy {
/**
* Try to interactively obtain key passphrases one-by-one via callbacks,
* eg [org.pgpainless.key.protection.passphrase_provider.SecretKeyPassphraseProvider].
*/
INTERACTIVE,
/**
* Do not try to obtain passphrases interactively and instead throw a
* [org.pgpainless.exception.MissingPassphraseException] listing all keys with missing passphrases.
*/
THROW_EXCEPTION
}