mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-23 04:42:06 +01:00
Deprecate PGPainless's PGPKeyRing
This commit is contained in:
parent
cae93022ad
commit
5ee17fac69
2 changed files with 6 additions and 0 deletions
|
@ -23,6 +23,7 @@ import org.bouncycastle.openpgp.PGPPublicKeyRing;
|
|||
import org.bouncycastle.openpgp.PGPSecretKeyRing;
|
||||
import org.pgpainless.key.OpenPgpV4Fingerprint;
|
||||
|
||||
@Deprecated
|
||||
public class PGPKeyRing {
|
||||
|
||||
private PGPPublicKeyRing publicKeys;
|
||||
|
|
|
@ -85,10 +85,12 @@ public class KeyRingReader {
|
|||
return secretKeyRingCollection(asciiArmored.getBytes(UTF8));
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public PGPKeyRing keyRing(@Nullable InputStream publicIn, @Nullable InputStream secretIn) throws IOException, PGPException {
|
||||
return readKeyRing(publicIn, secretIn);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public PGPKeyRing keyRing(@Nullable byte[] publicBytes, @Nullable byte[] secretBytes) throws IOException, PGPException {
|
||||
return keyRing(
|
||||
publicBytes != null ? new ByteArrayInputStream(publicBytes) : null,
|
||||
|
@ -96,6 +98,7 @@ public class KeyRingReader {
|
|||
);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public PGPKeyRing keyRing(@Nullable String asciiPublic, @Nullable String asciiSecret) throws IOException, PGPException {
|
||||
return keyRing(
|
||||
asciiPublic != null ? asciiPublic.getBytes(UTF8) : null,
|
||||
|
@ -133,6 +136,7 @@ public class KeyRingReader {
|
|||
new BcKeyFingerprintCalculator());
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static PGPKeyRing readKeyRing(@Nullable InputStream publicIn, @Nullable InputStream secretIn) throws IOException, PGPException {
|
||||
validateStreamsNotBothNull(publicIn, secretIn);
|
||||
|
||||
|
@ -162,6 +166,7 @@ public class KeyRingReader {
|
|||
return null;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
private static PGPKeyRing asPGPKeyRing(PGPPublicKeyRing publicKeys, PGPSecretKeyRing secretKeys) {
|
||||
if (secretKeys == null) {
|
||||
return new PGPKeyRing(publicKeys);
|
||||
|
|
Loading…
Reference in a new issue