Bees v0.5.0 API

bees.core.security
Class SecretKeyFactory

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

public final class SecretKeyFactory
extends java.lang.Object

A SecretKeyFactory is used to create secret keys from SecretKeySpecs.


Constructor Summary
SecretKeyFactory()
          Construct an empty SecretKeyFactory.
 
Method Summary
 SecretKey createKey(SecretKeySpec ks)
          Create a SecretKey capability from the given values.
 SecretKey createKey(SecretKeySpec ks, java.lang.String comment)
          Create a SecretKey capability 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

SecretKeyFactory

public SecretKeyFactory()
Construct an empty SecretKeyFactory.
Method Detail

createKey

public SecretKey createKey(SecretKeySpec ks,
                           java.lang.String comment)
                    throws java.security.NoSuchAlgorithmException,
                           java.security.spec.InvalidKeySpecException
Create a SecretKey capability from the given values.
Parameters:
ks - The key specification.
comment - A comment describing the key.
Returns:
A new SecretKey capability.
Throws:
java.security.NoSuchAlgorithmException - if the key algorithm is not available.
java.security.spec.InvalidKeySpecException - if the key spec is not valid.

createKey

public SecretKey createKey(SecretKeySpec ks)
                    throws java.security.NoSuchAlgorithmException,
                           java.security.spec.InvalidKeySpecException
Create a SecretKey capability from the given values.
Parameters:
ks - The key specification.
Returns:
A new SecretKey capability.
Throws:
java.security.NoSuchAlgorithmException - if the key algorithm is not available.
java.security.spec.InvalidKeySpecException - if the key spec is not valid.

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/