Constructor and Description |
---|
BCUtil() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
getDecodedBytes(byte[] bytes) |
static byte[] |
getDecodedBytes(InputStream inputStream) |
static org.bouncycastle.openpgp.PGPPublicKeyRing |
getKeyRingFromCollection(org.bouncycastle.openpgp.PGPPublicKeyRingCollection collection,
Long id) |
static org.bouncycastle.openpgp.PGPSecretKeyRing |
getKeyRingFromCollection(org.bouncycastle.openpgp.PGPSecretKeyRingCollection collection,
Long id) |
static org.bouncycastle.openpgp.PGPPublicKey |
getMasterKeyFrom(org.bouncycastle.openpgp.PGPKeyRing ring) |
static org.bouncycastle.openpgp.PGPPublicKey |
getMasterKeyFrom(org.bouncycastle.openpgp.PGPPublicKeyRing ring)
Return the
PGPPublicKey which is the master key of the key ring. |
static InputStream |
getPgpDecoderInputStream(byte[] bytes) |
static InputStream |
getPgpDecoderInputStream(InputStream inputStream) |
static boolean |
keyRingContainsKeyWithId(org.bouncycastle.openpgp.PGPPublicKeyRing ring,
long keyId) |
static boolean |
keyRingContainsKeyWithId(org.bouncycastle.openpgp.PGPSecretKeyRing ring,
long keyId) |
static org.bouncycastle.openpgp.PGPPublicKeyRingCollection |
keyRingsToKeyRingCollection(org.bouncycastle.openpgp.PGPPublicKeyRing... rings) |
static org.bouncycastle.openpgp.PGPSecretKeyRingCollection |
keyRingsToKeyRingCollection(org.bouncycastle.openpgp.PGPSecretKeyRing... rings) |
static org.bouncycastle.openpgp.PGPPublicKeyRing |
publicKeyRingFromSecretKeyRing(org.bouncycastle.openpgp.PGPSecretKeyRing secretKeys) |
static org.bouncycastle.openpgp.PGPPublicKeyRing |
removeUnassociatedKeysFromKeyRing(org.bouncycastle.openpgp.PGPPublicKeyRing ring,
org.bouncycastle.openpgp.PGPPublicKey masterKey)
Remove all keys from the key ring, are either not having a subkey signature from the master key
(identified by
masterKeyId ), or are revoked ("normal" key revocation, as well as subkey revocation). |
static org.bouncycastle.openpgp.PGPSecretKeyRing |
removeUnassociatedKeysFromKeyRing(org.bouncycastle.openpgp.PGPSecretKeyRing ring,
org.bouncycastle.openpgp.PGPPublicKey masterKey)
Remove all keys from the key ring, are either not having a subkey signature from the master key
(identified by
masterKeyId ), or are revoked ("normal" key revocation, as well as subkey revocation). |
static Set<Long> |
signingKeyIds(org.bouncycastle.openpgp.PGPSecretKeyRing ring) |
public BCUtil()
public static org.bouncycastle.openpgp.PGPPublicKeyRingCollection keyRingsToKeyRingCollection(@Nonnull org.bouncycastle.openpgp.PGPPublicKeyRing... rings) throws IOException, org.bouncycastle.openpgp.PGPException
IOException
org.bouncycastle.openpgp.PGPException
public static org.bouncycastle.openpgp.PGPSecretKeyRingCollection keyRingsToKeyRingCollection(@Nonnull org.bouncycastle.openpgp.PGPSecretKeyRing... rings) throws IOException, org.bouncycastle.openpgp.PGPException
IOException
org.bouncycastle.openpgp.PGPException
public static org.bouncycastle.openpgp.PGPPublicKeyRing publicKeyRingFromSecretKeyRing(@Nonnull org.bouncycastle.openpgp.PGPSecretKeyRing secretKeys) throws org.bouncycastle.openpgp.PGPException, IOException
org.bouncycastle.openpgp.PGPException
IOException
public static org.bouncycastle.openpgp.PGPSecretKeyRing getKeyRingFromCollection(@Nonnull org.bouncycastle.openpgp.PGPSecretKeyRingCollection collection, @Nonnull Long id) throws org.bouncycastle.openpgp.PGPException
org.bouncycastle.openpgp.PGPException
public static org.bouncycastle.openpgp.PGPPublicKeyRing getKeyRingFromCollection(@Nonnull org.bouncycastle.openpgp.PGPPublicKeyRingCollection collection, @Nonnull Long id) throws org.bouncycastle.openpgp.PGPException
org.bouncycastle.openpgp.PGPException
public static InputStream getPgpDecoderInputStream(@Nonnull byte[] bytes) throws IOException
IOException
public static InputStream getPgpDecoderInputStream(@Nonnull InputStream inputStream) throws IOException
IOException
public static byte[] getDecodedBytes(@Nonnull byte[] bytes) throws IOException
IOException
public static byte[] getDecodedBytes(@Nonnull InputStream inputStream) throws IOException
IOException
public static org.bouncycastle.openpgp.PGPPublicKeyRing removeUnassociatedKeysFromKeyRing(@Nonnull org.bouncycastle.openpgp.PGPPublicKeyRing ring, @Nonnull org.bouncycastle.openpgp.PGPPublicKey masterKey)
masterKeyId
), or are revoked ("normal" key revocation, as well as subkey revocation).ring
- key ringmasterKey
- master keypublic static org.bouncycastle.openpgp.PGPSecretKeyRing removeUnassociatedKeysFromKeyRing(@Nonnull org.bouncycastle.openpgp.PGPSecretKeyRing ring, @Nonnull org.bouncycastle.openpgp.PGPPublicKey masterKey)
masterKeyId
), or are revoked ("normal" key revocation, as well as subkey revocation).ring
- key ringmasterKey
- master keypublic static org.bouncycastle.openpgp.PGPPublicKey getMasterKeyFrom(@Nonnull org.bouncycastle.openpgp.PGPPublicKeyRing ring)
PGPPublicKey
which is the master key of the key ring.ring
- key ringpublic static org.bouncycastle.openpgp.PGPPublicKey getMasterKeyFrom(@Nonnull org.bouncycastle.openpgp.PGPKeyRing ring)
public static Set<Long> signingKeyIds(@Nonnull org.bouncycastle.openpgp.PGPSecretKeyRing ring)
public static boolean keyRingContainsKeyWithId(@Nonnull org.bouncycastle.openpgp.PGPPublicKeyRing ring, long keyId)
public static boolean keyRingContainsKeyWithId(@Nonnull org.bouncycastle.openpgp.PGPSecretKeyRing ring, long keyId)