KeyPairCodecFactory (GNU cryptographic primitives and tools)
Keywords: gnu.crypto.key.KeyPairCodecFactory,KeyPairCodecFactory class

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.key
Class KeyPairCodecFactory

    java.lang.Object
      |
      +--gnu.crypto.key.KeyPairCodecFactory

public class KeyPairCodecFactory
extends java.lang.Object

A Factory class to instantiate key encoder/decoder instances.

Method Summary
`static IKeyPairCodec` | `getInstance(byte[] buffer)` Returns an instance of a keypair codec given a byte array that is assumed to contain a previously encoded key (public or private).
`static IKeyPairCodec` | `getInstance(java.security.Key key)` Returns an instance of a keypair codec given a key.
`static IKeyPairCodec` | `getInstance(java.lang.String name)` Returns an instance of a keypair codec given its name.
`static java.util.Set` | `getNames()` Returns a `Set` of keypair codec names supported by this Factory.

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

Method Detail

### getInstance

    public static IKeyPairCodec getInstance(java.lang.String name)

  Returns an instance of a keypair codec given its name.

  Parameters:
    `name` - the case-insensitive key codec name.
  Returns:
    an instance of the keypair codec, or `null` if none found.

### getInstance

    public static IKeyPairCodec getInstance(byte[] buffer)

  Returns an instance of a keypair codec given a byte array that is assumed to contain a previously encoded key (public or private).

  Parameters:
    `buffer` - a byte array containing a previously encoded key.
  Returns:
    an instance of the keypair codec, or `null` if none found.

### getInstance

    public static IKeyPairCodec getInstance(java.security.Key key)

  Returns an instance of a keypair codec given a key.

  Parameters:
    `key` - the key to encode.
  Returns:
    an instance of the keypair codec, or `null` if none found.

### getNames

    public static final java.util.Set getNames()

  Returns a `Set` of keypair codec names supported by this Factory.

  Returns:
    a `Set` of keypair codec names (Strings).

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.