Class Whitelist.PubRingSelectionStrategy<O>
- java.lang.Object
-
- org.pgpainless.util.selection.keyring.PublicKeyRingSelectionStrategy<O>
-
- org.pgpainless.util.selection.keyring.impl.Whitelist.PubRingSelectionStrategy<O>
-
- Type Parameters:
O
- Type of identifier forPGPPublicKeyRingCollections
.
- All Implemented Interfaces:
KeyRingSelectionStrategy<org.bouncycastle.openpgp.PGPPublicKeyRing,org.bouncycastle.openpgp.PGPPublicKeyRingCollection,O>
- Enclosing class:
- Whitelist
public static class Whitelist.PubRingSelectionStrategy<O> extends PublicKeyRingSelectionStrategy<O>
KeyRingSelectionStrategy
which acceptsPGPPublicKeyRings
if thewhitelist
contains their primary key id. If the whitelist contains 123L for "alice@pgpainless.org", the key with primary key id 123L is acceptable for "alice@pgpainless.org".
-
-
Constructor Summary
Constructors Constructor Description PubRingSelectionStrategy(Map<O,Set<Long>> whitelist)
PubRingSelectionStrategy(MultiMap<O,Long> whitelist)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
accept(O identifier, org.bouncycastle.openpgp.PGPPublicKeyRing keyRing)
Return true, if the filter accepts the given-
Methods inherited from class org.pgpainless.util.selection.keyring.PublicKeyRingSelectionStrategy
selectKeyRingsFromCollection, selectKeyRingsFromCollections
-
-
-
-
Method Detail
-
accept
public boolean accept(O identifier, org.bouncycastle.openpgp.PGPPublicKeyRing keyRing)
Description copied from interface:KeyRingSelectionStrategy
Return true, if the filter accepts the givenkeyRing
based on the givenidentifier
.- Parameters:
identifier
- identifierkeyRing
- key ring- Returns:
- acceptance
-
-