mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-26 22:32:07 +01:00
Improve decryption API
This commit is contained in:
parent
88d59d04d7
commit
d53501c9cd
2 changed files with 11 additions and 0 deletions
|
@ -61,6 +61,15 @@ public class DecryptionBuilder implements DecryptionBuilderInterface {
|
|||
|
||||
class VerifyWithImpl implements VerifyWith {
|
||||
|
||||
@Override
|
||||
public HandleMissingPublicKeys verifyWith(PGPPublicKeyRingCollection publicKeyRingCollection) {
|
||||
Set<PGPPublicKeyRing> publicKeyRings = new HashSet<>();
|
||||
for (Iterator<PGPPublicKeyRing> i = publicKeyRingCollection.getKeyRings(); i.hasNext(); ) {
|
||||
publicKeyRings.add(i.next());
|
||||
}
|
||||
return verifyWith(publicKeyRings);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HandleMissingPublicKeys verifyWith(Set<OpenPgpV4Fingerprint> trustedKeyIds,
|
||||
PGPPublicKeyRingCollection publicKeyRingCollection) {
|
||||
|
|
|
@ -40,6 +40,8 @@ public interface DecryptionBuilderInterface {
|
|||
|
||||
interface VerifyWith {
|
||||
|
||||
HandleMissingPublicKeys verifyWith(PGPPublicKeyRingCollection publicKeyRings);
|
||||
|
||||
HandleMissingPublicKeys verifyWith(Set<OpenPgpV4Fingerprint> trustedFingerprints, PGPPublicKeyRingCollection publicKeyRings);
|
||||
|
||||
HandleMissingPublicKeys verifyWith(Set<PGPPublicKeyRing> publicKeyRings);
|
||||
|
|
Loading…
Reference in a new issue