gnu.crypto.keyring
Class GnuPublicKeyring
java.lang.Object
gnu.crypto.keyring.BaseKeyring
gnu.crypto.keyring.GnuPublicKeyring
- All Implemented Interfaces:
- IKeyring, IPublicKeyring
public class GnuPublicKeyring
- extends BaseKeyring
- implements IPublicKeyring
Field Summary |
static int |
USAGE
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
USAGE
public static final int USAGE
- See Also:
- Constant Field Values
GnuPublicKeyring
public GnuPublicKeyring(String mac,
int macLen)
GnuPublicKeyring
public GnuPublicKeyring()
containsCertificate
public boolean containsCertificate(String alias)
- Description copied from interface:
IPublicKeyring
Tests if this keyring contains a certificate entry with the specified
alias
.
- Specified by:
containsCertificate
in interface IPublicKeyring
- Parameters:
alias
- The alias of the certificate to check.
- Returns:
true
if this keyring contains a certificate entry
that has the given alias
; false
otherwise.
getCertificate
public Certificate getCertificate(String alias)
- Description copied from interface:
IPublicKeyring
Returns a certificate that has the given alias
, or
null
if this keyring has no such entry.
- Specified by:
getCertificate
in interface IPublicKeyring
- Parameters:
alias
- The alias of the certificate to find.
- Returns:
- The certificate with the designated
alias
, or
null
if none found.
putCertificate
public void putCertificate(String alias,
Certificate cert)
- Description copied from interface:
IPublicKeyring
Adds a certificate in this keyring, with the given alias
.
What happens if there is already a certificate entry with this alias?
- Specified by:
putCertificate
in interface IPublicKeyring
- Parameters:
alias
- The alias of this certificate entry.cert
- The certificate.
load
protected void load(InputStream in,
char[] password)
throws IOException
- Specified by:
load
in class BaseKeyring
- Throws:
IOException
store
protected void store(OutputStream out,
char[] password)
throws IOException
- Specified by:
store
in class BaseKeyring
- Throws:
IOException
Copyright © 2001, 2002, 2003
Free Software Foundation,
Inc. All Rights Reserved.