org.apache.directory.server.kerberos.shared.crypto.encryption
Class RandomKeyFactory

java.lang.Object
  extended by org.apache.directory.server.kerberos.shared.crypto.encryption.RandomKeyFactory

public class RandomKeyFactory
extends java.lang.Object

A factory class for producing random keys, suitable for use as session keys. For a list of desired cipher types, Kerberos random-to-key functions are used to derive keys for DES-, DES3-, AES-, and RC4-based encryption types.

Version:
$Rev$, $Date$
Author:
Apache Directory Project

Constructor Summary
RandomKeyFactory()
           
 
Method Summary
static EncryptionKey getRandomKey(EncryptionType encryptionType)
          Get a new random key for a given EncryptionType.
static java.util.Map<EncryptionType,EncryptionKey> getRandomKeys()
          Get a map of random keys.
static java.util.Map<EncryptionType,EncryptionKey> getRandomKeys(java.util.Set<EncryptionType> ciphers)
          Get a map of random keys for a list of cipher types to derive keys for.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomKeyFactory

public RandomKeyFactory()
Method Detail

getRandomKeys

public static java.util.Map<EncryptionType,EncryptionKey> getRandomKeys()
                                                                 throws KerberosException
Get a map of random keys. The default set of encryption types is used.

Returns:
The map of random keys.
Throws:
KerberosException

getRandomKeys

public static java.util.Map<EncryptionType,EncryptionKey> getRandomKeys(java.util.Set<EncryptionType> ciphers)
                                                                 throws KerberosException
Get a map of random keys for a list of cipher types to derive keys for.

Parameters:
ciphers - The list of ciphers to derive keys for.
Returns:
The list of KerberosKey's.
Throws:
KerberosException

getRandomKey

public static EncryptionKey getRandomKey(EncryptionType encryptionType)
                                  throws KerberosException
Get a new random key for a given EncryptionType.

Parameters:
encryptionType -
Returns:
The new random key.
Throws:
KerberosException


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.