|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--au.net.aba.pgp.Keyring
A PGP keyring. To use this package in conjunction with the ABA crypto provider it is necessary to use a PGP 2.3 compatible keyring, with no passphrase on the keyring.
In your application:
import au.net.aba.pgp.Keyring; Keyring keyRing = new Keyring(keyringdir); PublicKey publicKey = keyRing.getPublicKey(keyID);
Where keyringdir is directory containing the pgp
pubring.pgp and secring.pgp files and
keyID is the keyname to be retrieved.
| Field Summary | |
static java.lang.String |
ident
|
| Constructor Summary | |
Keyring(java.lang.String keyring)
Construct with user supplied keyring. |
|
| Method Summary | |
java.security.PrivateKey |
getPrivateKey(java.lang.String key)
Return the private key with the given key name. |
java.security.PrivateKey |
getPrivateKey(java.lang.String key,
java.lang.String provider)
Return a private key generated for a specific provider. |
java.security.PublicKey |
getPublicKey(java.lang.String key)
Return the public key with the given key name. |
java.security.PublicKey |
getPublicKey(java.lang.String key,
java.lang.String provider)
Return a public key generated for a specific provider. |
static void |
main(java.lang.String[] arg)
Display a key in the given keyring as a dotted hexadecimal string as per the AsciiEncodedKeySpec. |
au.net.aba.pgp.PublicKeyCertificatePacket |
readPublicKey(java.lang.String key)
Read a public key certificate. |
au.net.aba.pgp.SecretKeyCertificatePacket |
readSecretKey(java.lang.String key)
Read a private key. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
public static final java.lang.String ident
| Constructor Detail |
public Keyring(java.lang.String keyring)
| Method Detail |
public java.security.PublicKey getPublicKey(java.lang.String key)
throws java.security.KeyException,
java.io.IOException
key - the name of the key we want.
public java.security.PrivateKey getPrivateKey(java.lang.String key)
throws java.security.KeyException,
java.io.IOException
key - the name of the key we want.
public java.security.PublicKey getPublicKey(java.lang.String key,
java.lang.String provider)
throws java.security.KeyException,
java.io.IOException
key - the name of the key we want.provider - the name of the provider we want to use.
public java.security.PrivateKey getPrivateKey(java.lang.String key,
java.lang.String provider)
throws java.security.KeyException,
java.io.IOException
key - the name of the key we want.provider - the name of the provider we want to use.
public au.net.aba.pgp.PublicKeyCertificatePacket readPublicKey(java.lang.String key)
throws java.io.IOException
public au.net.aba.pgp.SecretKeyCertificatePacket readSecretKey(java.lang.String key)
throws java.io.IOException
public static void main(java.lang.String[] arg)
throws java.io.IOException
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||