1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-11-30 00:02:06 +01:00

SigningOptions: Replace arguments PGPSecretKeyRingCollection with Iterable<PGPSecretKeyRing>

This commit is contained in:
Paul Schaub 2021-12-13 01:14:55 +01:00
parent ba9de4b44a
commit e59a8884c1

View file

@ -17,7 +17,6 @@ import org.bouncycastle.openpgp.PGPPrivateKey;
import org.bouncycastle.openpgp.PGPPublicKey; import org.bouncycastle.openpgp.PGPPublicKey;
import org.bouncycastle.openpgp.PGPSecretKey; import org.bouncycastle.openpgp.PGPSecretKey;
import org.bouncycastle.openpgp.PGPSecretKeyRing; import org.bouncycastle.openpgp.PGPSecretKeyRing;
import org.bouncycastle.openpgp.PGPSecretKeyRingCollection;
import org.bouncycastle.openpgp.PGPSignatureGenerator; import org.bouncycastle.openpgp.PGPSignatureGenerator;
import org.bouncycastle.openpgp.operator.PGPContentSignerBuilder; import org.bouncycastle.openpgp.operator.PGPContentSignerBuilder;
import org.pgpainless.PGPainless; import org.pgpainless.PGPainless;
@ -108,7 +107,7 @@ public final class SigningOptions {
* @throws PGPException if any of the keys cannot be unlocked or a signing method cannot be created * @throws PGPException if any of the keys cannot be unlocked or a signing method cannot be created
*/ */
public SigningOptions addInlineSignatures(SecretKeyRingProtector secrectKeyDecryptor, public SigningOptions addInlineSignatures(SecretKeyRingProtector secrectKeyDecryptor,
PGPSecretKeyRingCollection signingKeys, Iterable<PGPSecretKeyRing> signingKeys,
DocumentSignatureType signatureType) DocumentSignatureType signatureType)
throws KeyValidationError, PGPException { throws KeyValidationError, PGPException {
for (PGPSecretKeyRing signingKey : signingKeys) { for (PGPSecretKeyRing signingKey : signingKeys) {
@ -213,7 +212,7 @@ public final class SigningOptions {
* @throws PGPException if any of the keys cannot be validated or unlocked, or if any signing method cannot be created * @throws PGPException if any of the keys cannot be validated or unlocked, or if any signing method cannot be created
*/ */
public SigningOptions addDetachedSignatures(SecretKeyRingProtector secretKeyDecryptor, public SigningOptions addDetachedSignatures(SecretKeyRingProtector secretKeyDecryptor,
PGPSecretKeyRingCollection signingKeys, Iterable<PGPSecretKeyRing> signingKeys,
DocumentSignatureType signatureType) DocumentSignatureType signatureType)
throws PGPException { throws PGPException {
for (PGPSecretKeyRing signingKey : signingKeys) { for (PGPSecretKeyRing signingKey : signingKeys) {