edu.vt.middleware.crypt.asymmetric
Class AsymmetricAlgorithm

java.lang.Object
  extended by edu.vt.middleware.crypt.AbstractAlgorithm
      extended by edu.vt.middleware.crypt.AbstractEncryptionAlgorithm
          extended by edu.vt.middleware.crypt.asymmetric.AsymmetricAlgorithm
All Implemented Interfaces:
Algorithm, EncryptionAlgorithm
Direct Known Subclasses:
RSA

public class AsymmetricAlgorithm
extends AbstractEncryptionAlgorithm

Provides asymmetric encryption and decryption operations using a public/private key pair.

Version:
$Revision: 2744 $
Author:
Middleware Services

Field Summary
static String MODE
          Mode used for encryption and decryption.
static String PADDING
          Padding used for encryption and decryption.
 
Fields inherited from class edu.vt.middleware.crypt.AbstractEncryptionAlgorithm
cipher, cipherMode, key, mode, padding
 
Fields inherited from class edu.vt.middleware.crypt.AbstractAlgorithm
algorithm, logger, randomByteSize, randomProvider
 
Constructor Summary
protected AsymmetricAlgorithm(String cipherAlgorithm)
          Creates a new instance that uses a cipher of the given algorithm and the default mode and padding.
 
Method Summary
 Object clone()
          
protected  AlgorithmParameterSpec getAlgorithmParameterSpec()
          Gets the algorithm parameter specification for this algorithm.
protected  int getChunkSize()
          Gets the chunk size for buffers using in stream-based encryption and decryption operations.
static AsymmetricAlgorithm newInstance(String algorithm)
          Creates a new instance that uses a cipher of the given name.
 
Methods inherited from class edu.vt.middleware.crypt.AbstractEncryptionAlgorithm
crypt, crypt, decrypt, decrypt, decrypt, encrypt, encrypt, encrypt, getBlockSize, getCipherMode, getMode, getPadding, init, initCipher, initDecrypt, initEncrypt, setKey, toString
 
Methods inherited from class edu.vt.middleware.crypt.AbstractAlgorithm
getAlgorithm, getRandomData, setRandomProvider
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.vt.middleware.crypt.Algorithm
getAlgorithm, getRandomData, setRandomProvider
 

Field Detail

MODE

public static final String MODE
Mode used for encryption and decryption.

See Also:
Constant Field Values

PADDING

public static final String PADDING
Padding used for encryption and decryption.

See Also:
Constant Field Values
Constructor Detail

AsymmetricAlgorithm

protected AsymmetricAlgorithm(String cipherAlgorithm)
Creates a new instance that uses a cipher of the given algorithm and the default mode and padding.

Parameters:
cipherAlgorithm - Cipher algorithm name.
Method Detail

newInstance

public static AsymmetricAlgorithm newInstance(String algorithm)
Creates a new instance that uses a cipher of the given name.

Parameters:
algorithm - Cipher algorithm name.
Returns:
Asymmetric algorithm instance that implements the given cipher algorithm.

clone

public Object clone()
             throws CloneNotSupportedException

Overrides:
clone in class Object
Throws:
CloneNotSupportedException

getAlgorithmParameterSpec

protected AlgorithmParameterSpec getAlgorithmParameterSpec()
Gets the algorithm parameter specification for this algorithm.

Specified by:
getAlgorithmParameterSpec in class AbstractEncryptionAlgorithm
Returns:
Algorithm parameter specification specific to this algorithm.

getChunkSize

protected int getChunkSize()
Gets the chunk size for buffers using in stream-based encryption and decryption operations.

Specified by:
getChunkSize in class AbstractEncryptionAlgorithm
Returns:
Stream chunk size.


Copyright © 2003-2013 Virginia Tech. All Rights Reserved.