mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-12-23 03:17:58 +01:00
Use *Options.get() factory methods in SOP module
This commit is contained in:
parent
4efe8fb468
commit
a2bfb55d87
6 changed files with 6 additions and 6 deletions
|
@ -35,7 +35,7 @@ import sop.operation.Decrypt;
|
|||
|
||||
public class DecryptImpl implements Decrypt {
|
||||
|
||||
private final ConsumerOptions consumerOptions = new ConsumerOptions();
|
||||
private final ConsumerOptions consumerOptions = ConsumerOptions.get();
|
||||
private final MatchMakingSecretKeyRingProtector protector = new MatchMakingSecretKeyRingProtector();
|
||||
|
||||
@Override
|
||||
|
|
|
@ -39,7 +39,7 @@ public class DetachedSignImpl implements DetachedSign {
|
|||
|
||||
private boolean armor = true;
|
||||
private SignAs mode = SignAs.Binary;
|
||||
private final SigningOptions signingOptions = new SigningOptions();
|
||||
private final SigningOptions signingOptions = SigningOptions.get();
|
||||
private final MatchMakingSecretKeyRingProtector protector = new MatchMakingSecretKeyRingProtector();
|
||||
|
||||
@Override
|
||||
|
|
|
@ -24,7 +24,7 @@ import sop.operation.DetachedVerify;
|
|||
|
||||
public class DetachedVerifyImpl implements DetachedVerify {
|
||||
|
||||
private final ConsumerOptions options = new ConsumerOptions();
|
||||
private final ConsumerOptions options = ConsumerOptions.get();
|
||||
|
||||
@Override
|
||||
public DetachedVerify notBefore(Date timestamp) throws SOPGPException.UnsupportedOption {
|
||||
|
|
|
@ -36,7 +36,7 @@ import sop.util.ProxyOutputStream;
|
|||
|
||||
public class EncryptImpl implements Encrypt {
|
||||
|
||||
EncryptionOptions encryptionOptions = new EncryptionOptions();
|
||||
EncryptionOptions encryptionOptions = EncryptionOptions.get();
|
||||
SigningOptions signingOptions = null;
|
||||
MatchMakingSecretKeyRingProtector protector = new MatchMakingSecretKeyRingProtector();
|
||||
private final Set<PGPSecretKeyRing> signingKeys = new HashSet<>();
|
||||
|
|
|
@ -80,7 +80,7 @@ public class InlineSignImpl implements InlineSign {
|
|||
for (PGPSecretKeyRing key : signingKeys) {
|
||||
try {
|
||||
if (mode == InlineSignAs.CleartextSigned) {
|
||||
signingOptions.addDetachedSignature(protector, key, DocumentSignatureType.BINARY_DOCUMENT);
|
||||
signingOptions.addDetachedSignature(protector, key);
|
||||
} else {
|
||||
signingOptions.addInlineSignature(protector, key, modeToSigType(mode));
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ import sop.operation.InlineVerify;
|
|||
|
||||
public class InlineVerifyImpl implements InlineVerify {
|
||||
|
||||
private final ConsumerOptions options = new ConsumerOptions();
|
||||
private final ConsumerOptions options = ConsumerOptions.get();
|
||||
|
||||
@Override
|
||||
public InlineVerify notBefore(Date timestamp) throws SOPGPException.UnsupportedOption {
|
||||
|
|
Loading…
Reference in a new issue