gnu.crypto.key
Class KeyPairCodecFactory
public class KeyPairCodecFactory
A Factory class to instantiate key encoder/decoder instances.
static IKeyPairCodec | getInstance(Key key) - Returns an instance of a keypair codec given a key.
|
static IKeyPairCodec | getInstance(String name) - Returns an instance of a keypair codec given its name.
|
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 Set | getNames() - Returns a
Set of keypair codec names supported by this
Factory.
|
getInstance
public static IKeyPairCodec getInstance(Key key)
Returns an instance of a keypair codec given a key.
- an instance of the keypair codec, or
null
if none
found.
getInstance
public static IKeyPairCodec getInstance(String name)
Returns an instance of a keypair codec given its name.
name
- the case-insensitive key codec name.
- 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).
buffer
- a byte array containing a previously encoded key.
- an instance of the keypair codec, or
null
if none
found.
getNames
public static final Set getNames()
Returns a Set
of keypair codec names supported by this
Factory.
- a
Set
of keypair codec names (Strings).
Copyright © 2001, 2002, 2003
Free Software Foundation,
Inc. All Rights Reserved.