1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2025-09-10 18:59:39 +02:00

Remove unused BCUtil.publicKeyRingFromSecretKeyRing method

Use KeyRingUtils.publicKeyRingFrom(secertKeys) instead
This commit is contained in:
Paul Schaub 2021-01-21 14:33:52 +01:00
parent 74c0c8a32e
commit bd9a580600
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
2 changed files with 5 additions and 19 deletions

View file

@ -64,20 +64,6 @@ public class BCUtil {
return new PGPSecretKeyRingCollection(Arrays.asList(rings));
}
public static PGPPublicKeyRing publicKeyRingFromSecretKeyRing(@Nonnull PGPSecretKeyRing secretKeys)
throws PGPException, IOException {
ByteArrayOutputStream buffer = new ByteArrayOutputStream(512);
for (PGPSecretKey secretKey : secretKeys) {
PGPPublicKey publicKey = secretKey.getPublicKey();
if (publicKey != null) {
publicKey.encode(buffer, false);
}
}
KeyFingerPrintCalculator fingerprintCalculator = ImplementationFactory.getInstance().getKeyFingerprintCalculator();
return new PGPPublicKeyRing(buffer.toByteArray(), fingerprintCalculator);
}
/*
PGPXxxKeyRingCollection -> PGPXxxKeyRing
*/