edu.vt.middleware.crypt.pbe
Class PBES1EncryptionScheme

java.lang.Object
  extended by edu.vt.middleware.crypt.pbe.AbstractEncryptionScheme
      extended by edu.vt.middleware.crypt.pbe.PBES1EncryptionScheme
All Implemented Interfaces:
EncryptionScheme

public class PBES1EncryptionScheme
extends AbstractEncryptionScheme

Implements the PBES1 encryption scheme defined in PKCS#5v2.

Version:
$Revision: 2744 $
Author:
Middleware Services

Field Summary
static int IV_LENGTH
          Number of bytes (octets) in IV.
static int KEY_LENGTH
          Number of bytes (octets) in derived key.
 
Fields inherited from class edu.vt.middleware.crypt.pbe.AbstractEncryptionScheme
cipher
 
Constructor Summary
PBES1EncryptionScheme(PBES1Algorithm alg, PBEParameter params)
          Creates a new instance with the given parameters.
PBES1EncryptionScheme(SymmetricAlgorithm alg, DigestAlgorithm digest, PBEParameter params)
          Creates a new instance with the given parameters.
 
Method Summary
protected  void initCipher(char[] password)
          Initializes the cipher with the given PBE derived key bytes.
 
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
 

Field Detail

KEY_LENGTH

public static final int KEY_LENGTH
Number of bytes (octets) in derived key.

See Also:
Constant Field Values

IV_LENGTH

public static final int IV_LENGTH
Number of bytes (octets) in IV.

See Also:
Constant Field Values
Constructor Detail

PBES1EncryptionScheme

public PBES1EncryptionScheme(PBES1Algorithm alg,
                             PBEParameter params)
Creates a new instance with the given parameters.

Parameters:
alg - Describes hash/algorithm pair suitable for PBES1 scheme.
params - Key generation function salt and iteration count.

PBES1EncryptionScheme

public PBES1EncryptionScheme(SymmetricAlgorithm alg,
                             DigestAlgorithm digest,
                             PBEParameter params)
Creates a new instance with the given parameters.

Parameters:
alg - Symmetric algorithm used for encryption/decryption.
digest - Key generation function digest.
params - Key generation function salt and iteration count.
Method Detail

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-2013 Virginia Tech. All Rights Reserved.