mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-26 22:32:07 +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.bouncycastle.openpgp.PGPSecretKeyRing;
|
||||||
import org.pgpainless.key.OpenPgpV4Fingerprint;
|
import org.pgpainless.key.OpenPgpV4Fingerprint;
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public class PGPKeyRing {
|
public class PGPKeyRing {
|
||||||
|
|
||||||
private PGPPublicKeyRing publicKeys;
|
private PGPPublicKeyRing publicKeys;
|
||||||
|
|
|
@ -85,10 +85,12 @@ public class KeyRingReader {
|
||||||
return secretKeyRingCollection(asciiArmored.getBytes(UTF8));
|
return secretKeyRingCollection(asciiArmored.getBytes(UTF8));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public PGPKeyRing keyRing(@Nullable InputStream publicIn, @Nullable InputStream secretIn) throws IOException, PGPException {
|
public PGPKeyRing keyRing(@Nullable InputStream publicIn, @Nullable InputStream secretIn) throws IOException, PGPException {
|
||||||
return readKeyRing(publicIn, secretIn);
|
return readKeyRing(publicIn, secretIn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public PGPKeyRing keyRing(@Nullable byte[] publicBytes, @Nullable byte[] secretBytes) throws IOException, PGPException {
|
public PGPKeyRing keyRing(@Nullable byte[] publicBytes, @Nullable byte[] secretBytes) throws IOException, PGPException {
|
||||||
return keyRing(
|
return keyRing(
|
||||||
publicBytes != null ? new ByteArrayInputStream(publicBytes) : null,
|
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 {
|
public PGPKeyRing keyRing(@Nullable String asciiPublic, @Nullable String asciiSecret) throws IOException, PGPException {
|
||||||
return keyRing(
|
return keyRing(
|
||||||
asciiPublic != null ? asciiPublic.getBytes(UTF8) : null,
|
asciiPublic != null ? asciiPublic.getBytes(UTF8) : null,
|
||||||
|
@ -133,6 +136,7 @@ public class KeyRingReader {
|
||||||
new BcKeyFingerprintCalculator());
|
new BcKeyFingerprintCalculator());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public static PGPKeyRing readKeyRing(@Nullable InputStream publicIn, @Nullable InputStream secretIn) throws IOException, PGPException {
|
public static PGPKeyRing readKeyRing(@Nullable InputStream publicIn, @Nullable InputStream secretIn) throws IOException, PGPException {
|
||||||
validateStreamsNotBothNull(publicIn, secretIn);
|
validateStreamsNotBothNull(publicIn, secretIn);
|
||||||
|
|
||||||
|
@ -162,6 +166,7 @@ public class KeyRingReader {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
private static PGPKeyRing asPGPKeyRing(PGPPublicKeyRing publicKeys, PGPSecretKeyRing secretKeys) {
|
private static PGPKeyRing asPGPKeyRing(PGPPublicKeyRing publicKeys, PGPSecretKeyRing secretKeys) {
|
||||||
if (secretKeys == null) {
|
if (secretKeys == null) {
|
||||||
return new PGPKeyRing(publicKeys);
|
return new PGPKeyRing(publicKeys);
|
||||||
|
|
Loading…
Reference in a new issue