mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-19 02:42:05 +01:00
Kotlin conversion: CustomPublicKeyDataDecryptorFactory
This commit is contained in:
parent
d8df6c35d0
commit
3115e13bc2
2 changed files with 26 additions and 27 deletions
|
@ -1,27 +0,0 @@
|
||||||
// SPDX-FileCopyrightText: 2022 Paul Schaub <vanitasvitae@fsfe.org>
|
|
||||||
//
|
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
|
||||||
|
|
||||||
package org.pgpainless.decryption_verification;
|
|
||||||
|
|
||||||
import org.bouncycastle.openpgp.operator.PublicKeyDataDecryptorFactory;
|
|
||||||
import org.pgpainless.key.SubkeyIdentifier;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Custom {@link PublicKeyDataDecryptorFactory} which can enable customized implementations of message decryption
|
|
||||||
* using public keys.
|
|
||||||
* This class can for example be used to implement message encryption using hardware tokens like smartcards or
|
|
||||||
* TPMs.
|
|
||||||
* @see ConsumerOptions#addCustomDecryptorFactory(CustomPublicKeyDataDecryptorFactory)
|
|
||||||
*/
|
|
||||||
public interface CustomPublicKeyDataDecryptorFactory extends PublicKeyDataDecryptorFactory {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return the {@link SubkeyIdentifier} for which this particular {@link CustomPublicKeyDataDecryptorFactory}
|
|
||||||
* is intended.
|
|
||||||
*
|
|
||||||
* @return subkey identifier
|
|
||||||
*/
|
|
||||||
SubkeyIdentifier getSubkeyIdentifier();
|
|
||||||
|
|
||||||
}
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
// SPDX-FileCopyrightText: 2023 Paul Schaub <vanitasvitae@fsfe.org>
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
package org.pgpainless.decryption_verification
|
||||||
|
|
||||||
|
import org.bouncycastle.openpgp.operator.PublicKeyDataDecryptorFactory
|
||||||
|
import org.pgpainless.key.SubkeyIdentifier
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Custom [PublicKeyDataDecryptorFactory] which can enable customized implementations of message decryption
|
||||||
|
* using public keys.
|
||||||
|
* This class can for example be used to implement message encryption using hardware tokens like smartcards or
|
||||||
|
* TPMs.
|
||||||
|
* @see [ConsumerOptions.addCustomDecryptorFactory]
|
||||||
|
*/
|
||||||
|
interface CustomPublicKeyDataDecryptorFactory : PublicKeyDataDecryptorFactory {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Identifier for the subkey for which this particular [CustomPublicKeyDataDecryptorFactory]
|
||||||
|
* is intended.
|
||||||
|
*
|
||||||
|
* @return subkey identifier
|
||||||
|
*/
|
||||||
|
val subkeyIdentifier: SubkeyIdentifier
|
||||||
|
}
|
Loading…
Reference in a new issue