edu.vt.middleware.crypt.pbe
Class AbstractVariableKeySizeEncryptionScheme

java.lang.Object
  extended by edu.vt.middleware.crypt.pbe.AbstractEncryptionScheme
      extended by edu.vt.middleware.crypt.pbe.AbstractVariableKeySizeEncryptionScheme
All Implemented Interfaces:
EncryptionScheme
Direct Known Subclasses:
OpenSSLEncryptionScheme, PBES2EncryptionScheme, PKCS12EncryptionScheme

public abstract class AbstractVariableKeySizeEncryptionScheme
extends AbstractEncryptionScheme

Base class for all encryption schemes that use a variable-length key to perform encryption, e.g. the PBES2 encryption scheme described in PKCS#5v2 and the PKCS#12 PBE scheme.

Version:
$Revision: 1818 $
Author:
Middleware Services

Field Summary
 
Fields inherited from class edu.vt.middleware.crypt.pbe.AbstractEncryptionScheme
cipher
 
Constructor Summary
AbstractVariableKeySizeEncryptionScheme()
           
 
Method Summary
protected  void initCipher(char[] password)
          Initializes the cipher with the given PBE derived key bytes.
protected  void setGenerator(KeyGenerator keyGen)
          Sets the key generator.
protected  void setKeyLength(int l)
          Sets the derived key length in bits.
 
Methods inherited from class edu.vt.middleware.crypt.pbe.AbstractEncryptionScheme
decrypt, decrypt, encrypt, encrypt, setCipher
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractVariableKeySizeEncryptionScheme

public AbstractVariableKeySizeEncryptionScheme()
Method Detail

setKeyLength

protected void setKeyLength(int l)
Sets the derived key length in bits.

Parameters:
l - Derived key length in bits.

setGenerator

protected void setGenerator(KeyGenerator keyGen)
Sets the key generator.

Parameters:
keyGen - Key generator instance.

initCipher

protected void initCipher(char[] password)
Initializes the cipher with the given PBE derived key bytes.

Specified by:
initCipher in class AbstractEncryptionScheme
Parameters:
password - PBE password.


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