Bees v0.5.0 API

bees.core.security
Class KeyPairGenerator

java.lang.Object
  |
  +--bees.core.security.KeyPairGenerator

public final class KeyPairGenerator
extends java.lang.Object

A KeyPairGenerator is used to manufacture new public and private key capabilities.


Constructor Summary
KeyPairGenerator()
          Construct an empty KeyPairGenerator.
 
Method Summary
 KeyPair generateKeyPair(java.lang.String algorithm, int keySize)
          Generate a new key pair from the given values.
 KeyPair generateKeyPair(java.lang.String algorithm, int keySize, java.lang.String comment)
          Generate a new key pair from the given values.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

KeyPairGenerator

public KeyPairGenerator()
Construct an empty KeyPairGenerator.
Method Detail

generateKeyPair

public KeyPair generateKeyPair(java.lang.String algorithm,
                               int keySize,
                               java.lang.String comment)
                        throws java.security.NoSuchAlgorithmException
Generate a new key pair from the given values.
Parameters:
algorithm - The type of key to generate.
keySize - The suggested number of bits the key should have.
comment - A comment to attach to the capability.
Returns:
A KeyPair containing the public and private key capabilities.
Throws:
java.security.NoSuchAlgorithmException - if "algorithm" is not available.

generateKeyPair

public KeyPair generateKeyPair(java.lang.String algorithm,
                               int keySize)
                        throws java.security.NoSuchAlgorithmException
Generate a new key pair from the given values.
Parameters:
algorithm - The type of key to generate.
keySize - The suggested number of bits the key should have.
Returns:
A KeyPair containing the public and private key capabilities.
Throws:
java.security.NoSuchAlgorithmException - if "algorithm" is not available.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

Bees v0.5.0 API

This documentation is Copyright (C) 2002 The University of Utah. All Rights Reserved. See the individual source files for distribution terms.
Documentation, software, and mailing lists for Bees v0.5.0 can be found at the Janos Project: http://www.cs.utah.edu/flux/janos/