Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
| For the latest news and information visit The GNU Crypto project
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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`

Fields inherited from class gnu.crypto.keyring.BaseKeyring
`keyring, keyring2`

Fields inherited from interface gnu.crypto.keyring.IKeyring
`KEYRING_DATA_IN, KEYRING_DATA_OUT, KEYRING_PASSWORD`

Constructor Summary
`GnuPublicKeyring()`
`GnuPublicKeyring(java.lang.String mac, int macLen)`

Method Summary
`boolean` | `containsCertificate(java.lang.String alias)` Tests if this keyring contains a certificate entry with the specified `alias`.
`java.security.cert.Certificate` | `getCertificate(java.lang.String alias)` Returns a certificate that has the given `alias`, or `null` if this keyring has no such entry.
`protected void` | `load(java.io.InputStream in, char[] password)`
`void` | `putCertificate(java.lang.String alias, java.security.cert.Certificate cert)` Adds a certificate in this keyring, with the given `alias`.
`protected void` | `store(java.io.OutputStream out, char[] password)`

Methods inherited from class gnu.crypto.keyring.BaseKeyring
`add, aliases, containsAlias, fixAlias, get, load, remove, reset, size, store`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface gnu.crypto.keyring.IKeyring
`add, aliases, containsAlias, get, load, remove, reset, size, store`

Field Detail

### USAGE

    public static final int USAGE

See Also:
  Constant Field Values

Constructor Detail

### GnuPublicKeyring

    public GnuPublicKeyring(java.lang.String mac,
                            int macLen)

### GnuPublicKeyring

    public GnuPublicKeyring()

Method Detail

### containsCertificate

    public boolean containsCertificate(java.lang.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 java.security.cert.Certificate getCertificate(java.lang.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(java.lang.String alias,
                               java.security.cert.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(java.io.InputStream in,
                        char[] password)
                 throws java.io.IOException

  Specified by:
    `load` in class `BaseKeyring`
    `java.io.IOException`

### store

    protected void store(java.io.OutputStream out,
                         char[] password)
                  throws java.io.IOException

  Specified by:
    `store` in class `BaseKeyring`
    `java.io.IOException`

Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
| For the latest news and information visit The GNU Crypto project
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001, 2002, 2003, 2004 Free Software Foundation, Inc.