mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-29 07:42:06 +01:00
Add Wildcard KeyRingSelectionStrategy
This commit is contained in:
parent
992432fc59
commit
719c467768
1 changed files with 25 additions and 0 deletions
|
@ -0,0 +1,25 @@
|
||||||
|
package de.vanitasvitae.crypto.pgpainless.key.selection.keyring.impl;
|
||||||
|
|
||||||
|
import de.vanitasvitae.crypto.pgpainless.key.selection.keyring.PublicKeyRingSelectionStrategy;
|
||||||
|
import de.vanitasvitae.crypto.pgpainless.key.selection.keyring.SecretKeyRingSelectionStrategy;
|
||||||
|
import org.bouncycastle.openpgp.PGPPublicKeyRing;
|
||||||
|
import org.bouncycastle.openpgp.PGPSecretKeyRing;
|
||||||
|
|
||||||
|
public class Wildcard {
|
||||||
|
|
||||||
|
public class PubRingSelectionStrategy<O> extends PublicKeyRingSelectionStrategy<O> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean accept(O identifier, PGPPublicKeyRing keyRing) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class SecRingSelectionStrategy<O> extends SecretKeyRingSelectionStrategy<O> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean accept(O identifier, PGPSecretKeyRing keyRing) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue