Enhydra-Oyster 2.1-7 API

org.enhydra.oyster.crypto
Class AlgorithmChecker

java.lang.Object
  extended byorg.enhydra.oyster.crypto.AlgorithmChecker

public class AlgorithmChecker
extends java.lang.Object

AlgorithmChecker class represents check point for input parameters for the symmetric encryption. Algorithm names and corresponding key length are:
DES - 56
DES_EDE3_CBC - 128, 192
RC2_CBC - 40, 64, 128


Constructor Summary
AlgorithmChecker(java.lang.String algorithm0, int keySize0)
          Object construction with the given name of algorithm and key size in bits.
 
Method Summary
 java.lang.String getAlgorithmName()
          Returns algorithm name used in the symmetric encryption.
 int getKeySize()
          Returns key size in bits which is used in the symmetric algorithm.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlgorithmChecker

public AlgorithmChecker(java.lang.String algorithm0,
                        int keySize0)
                 throws SMIMEException
Object construction with the given name of algorithm and key size in bits. This constructor performs checking of the imported parameters of the algorithm and defines specific names for later use in Chiper class.

Parameters:
algorithm0 - name of the one of the following algorithms: "DES", "DES_EDE3_CBC" and "RC2_CBC".
keySize0 - key size in bits.
Throws:
SMIMEException - in case of invalid algorithm names, or in case of wrong key sizes in bits.
Method Detail

getAlgorithmName

public java.lang.String getAlgorithmName()
Returns algorithm name used in the symmetric encryption.

Returns:
Name of the chosen algorithm for symmetric encryption.

getKeySize

public int getKeySize()
Returns key size in bits which is used in the symmetric algorithm.

Returns:
Key size in bits for the algorithm used in the symmetric encryption.

Enhydra-Oyster 2.1-7 API