org.apache.commons.openpgp
Class BouncyCastleKeyRing
java.lang.Object
org.apache.commons.openpgp.BouncyCastleKeyRing
- All Implemented Interfaces:
- KeyRing
public class BouncyCastleKeyRing
- extends Object
- implements KeyRing
Bouncy Castle implementation of the OpenPGP key ring.
- Author:
- Brett Porter
Fields inherited from interface org.apache.commons.openpgp.KeyRing |
ROLE |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BouncyCastleKeyRing
public BouncyCastleKeyRing()
BouncyCastleKeyRing
public BouncyCastleKeyRing(InputStream secretKeyRingStream,
InputStream publicKeyRingStream,
char[] password)
throws IOException,
org.bouncycastle.openpgp.PGPException
- Throws:
IOException
org.bouncycastle.openpgp.PGPException
addPublicKeyRing
public void addPublicKeyRing(InputStream publicKeyRingStream)
throws IOException,
org.bouncycastle.openpgp.PGPException
- Specified by:
addPublicKeyRing
in interface KeyRing
- Throws:
IOException
org.bouncycastle.openpgp.PGPException
addSecretKeyRing
public void addSecretKeyRing(InputStream secretKeyRingStream,
char[] password)
throws IOException,
org.bouncycastle.openpgp.PGPException
- Throws:
IOException
org.bouncycastle.openpgp.PGPException
getFirstKeyId
public String getFirstKeyId()
- Description copied from interface:
KeyRing
- Get the key ID of the first secret key that was added to the keyring.
- Specified by:
getFirstKeyId
in interface KeyRing
getPassword
public char[] getPassword()
- Specified by:
getPassword
in interface KeyRing
- Returns:
getSecretKey
public org.bouncycastle.openpgp.PGPSecretKey getSecretKey(String keyId)
- Specified by:
getSecretKey
in interface KeyRing
- Returns:
getPublicKey
public org.bouncycastle.openpgp.PGPPublicKey getPublicKey(String keyId)
- Specified by:
getPublicKey
in interface KeyRing
- Returns:
getSecretKey
public org.bouncycastle.openpgp.PGPSecretKey getSecretKey(long keyId)
- Specified by:
getSecretKey
in interface KeyRing
- Returns:
getPublicKey
public org.bouncycastle.openpgp.PGPPublicKey getPublicKey(long keyId)
- Specified by:
getPublicKey
in interface KeyRing
- Returns:
Copyright © 2005-2013 The Apache Software Foundation. All Rights Reserved.