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:
parent
74c0c8a32e
commit
bd9a580600
2 changed files with 5 additions and 19 deletions
|
@ -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
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue