HDIV API 2.0.4

org.hdiv.cipher
Class KeyFactory

java.lang.Object
  extended by org.hdiv.cipher.KeyFactory
All Implemented Interfaces:
IKeyFactory

public class KeyFactory
extends java.lang.Object
implements IKeyFactory

Key Factory generator.

Author:
Roberto Velasco

Field Summary
static java.lang.String DEFAULT_ALGORITHM
          Name of the default PRNG algorithm
static java.lang.String DEFAULT_PROVIDER
          Name of the default provider
 
Constructor Summary
KeyFactory()
           
 
Method Summary
 Key generateKey()
          This method is called whenever a key needs to be generated.
 Key generateKeyWithDefaultValues()
          This method is called whenever a key needs to be generated with Pseudo Random Number Generator algorithm and provider default values.
 java.lang.String getAlgorithm()
           
 int getKeySize()
           
 java.lang.String getPrngAlgorithm()
           
 java.lang.String getProvider()
           
 void setAlgorithm(java.lang.String algorithm)
           
 void setKeySize(int keySize)
           
 void setPrngAlgorithm(java.lang.String prngAlgorithm)
           
 void setProvider(java.lang.String provider)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_ALGORITHM

public static final java.lang.String DEFAULT_ALGORITHM
Name of the default PRNG algorithm

See Also:
Constant Field Values

DEFAULT_PROVIDER

public static final java.lang.String DEFAULT_PROVIDER
Name of the default provider

See Also:
Constant Field Values
Constructor Detail

KeyFactory

public KeyFactory()
Method Detail

generateKeyWithDefaultValues

public Key generateKeyWithDefaultValues()
This method is called whenever a key needs to be generated with Pseudo Random Number Generator algorithm and provider default values.

Specified by:
generateKeyWithDefaultValues in interface IKeyFactory
Returns:
Key the encryption key

generateKey

public Key generateKey()
This method is called whenever a key needs to be generated.

Specified by:
generateKey in interface IKeyFactory
Returns:
Key the encryption key

getAlgorithm

public java.lang.String getAlgorithm()
Returns:
Returns the algorithm for the Key Generator.

setAlgorithm

public void setAlgorithm(java.lang.String algorithm)
Parameters:
algorithm - The algorithm to set for the Key Generator.

getKeySize

public int getKeySize()

setKeySize

public void setKeySize(int keySize)

getProvider

public java.lang.String getProvider()
Returns:
Returns the provider name.

setProvider

public void setProvider(java.lang.String provider)
Parameters:
provider - The provider to set.

getPrngAlgorithm

public java.lang.String getPrngAlgorithm()
Returns:
Returns the prngAlgorithm.

setPrngAlgorithm

public void setPrngAlgorithm(java.lang.String prngAlgorithm)
Parameters:
prngAlgorithm - The prngAlgorithm to set.

HDIV 2.0.4

Copyright © 2008 hdiv.org. All Rights Reserved.