org.webdocwf.util.smime.crypto
Class Algorithm
java.lang.Object
|
+--org.webdocwf.util.smime.crypto.Algorithm
- public class Algorithm
- extends java.lang.Object
Algorithm 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 |
Algorithm(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 |
Algorithm
public Algorithm(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.
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.
Copyright © 2002-2002 Together Teamlösungen. All Rights Reserved.