edu.vt.middleware.crypt.pkcs
Enum PBES1Algorithm

java.lang.Object
  extended by java.lang.Enum<PBES1Algorithm>
      extended by edu.vt.middleware.crypt.pkcs.PBES1Algorithm
All Implemented Interfaces:
Serializable, Comparable<PBES1Algorithm>

public enum PBES1Algorithm
extends Enum<PBES1Algorithm>

Password-based encryption algorithms defined in PKCS#5 for PBES1 scheme.

Version:
$Revision: 2745 $
Author:
Middleware Services

Enum Constant Summary
PbeWithMD2AndDES_CBC
          PBES1 encryption method with MD2 hash and DES CBC cipher.
PbeWithMD2AndRC2_CBC
          PBES1 encryption method with MD2 hash and RC2 CBC cipher.
PbeWithMD5AndDES_CBC
          PBES1 encryption method with MD5 hash and DES CBC cipher.
PbeWithMD5AndRC2_CBC
          PBES1 encryption method with MD5 hash and RC2 CBC cipher.
PbeWithSHA1AndDES_CBC
          PBES1 encryption method with SHA1 hash and DES CBC cipher.
PbeWithSHA1AndRC2_CBC
          PBES1 encryption method with SHA1 hash and RC2 CBC cipher.
 
Method Summary
static PBES1Algorithm fromOid(String oid)
          Gets the PBE algorithm for the given object identifier.
 DigestAlgorithm getDigest()
           
 String getOid()
           
 AlgorithmSpec getSpec()
           
static PBES1Algorithm valueOf(String name)
          Returns the enum constant of this type with the specified name.
static PBES1Algorithm[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

PbeWithMD2AndDES_CBC

public static final PBES1Algorithm PbeWithMD2AndDES_CBC
PBES1 encryption method with MD2 hash and DES CBC cipher.


PbeWithMD2AndRC2_CBC

public static final PBES1Algorithm PbeWithMD2AndRC2_CBC
PBES1 encryption method with MD2 hash and RC2 CBC cipher.


PbeWithMD5AndDES_CBC

public static final PBES1Algorithm PbeWithMD5AndDES_CBC
PBES1 encryption method with MD5 hash and DES CBC cipher.


PbeWithMD5AndRC2_CBC

public static final PBES1Algorithm PbeWithMD5AndRC2_CBC
PBES1 encryption method with MD5 hash and RC2 CBC cipher.


PbeWithSHA1AndDES_CBC

public static final PBES1Algorithm PbeWithSHA1AndDES_CBC
PBES1 encryption method with SHA1 hash and DES CBC cipher.


PbeWithSHA1AndRC2_CBC

public static final PBES1Algorithm PbeWithSHA1AndRC2_CBC
PBES1 encryption method with SHA1 hash and RC2 CBC cipher.

Method Detail

values

public static PBES1Algorithm[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (PBES1Algorithm c : PBES1Algorithm.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static PBES1Algorithm valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

fromOid

public static PBES1Algorithm fromOid(String oid)
Gets the PBE algorithm for the given object identifier.

Parameters:
oid - PBE algorithm OID.
Returns:
Algorithm whose identifier equals given value.
Throws:
IllegalArgumentException - If no matching algorithm found.

getOid

public String getOid()
Returns:
the oid

getSpec

public AlgorithmSpec getSpec()
Returns:
Cipher algorithm specification.

getDigest

public DigestAlgorithm getDigest()
Returns:
Digest algorithm.


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