This document describes the changes to the constants.
The change is motivated by a Semper article.
Previously, constants were defined in CryptoConstants.java as
final ints. Now they have been moved to seperate classes, according to
what kind of thing they specify. These classes are (with changes in
constant names below them):
PK_RSA -> AsymmetricEncrAlgorithm.RSA
CRYPT_DES -> ConventionalAlgorithm.DES
CRYPT_IDEA -> ConventionalAlgorithm.IDEA
CRYPT_3DES -> ConventionalAlgorithm.DES3
getLength()to obtain the length of a key (in bytes).
HASH_MD4 -> HashingAlgorithm.MD4
HASH_MD5 -> HashingAlgorithm.MD5
HASH_RIPEMD160 -> HashingAlgorithm.RIPEMD160
HASH_MDC2 -> HashingAlgorithm.MDC2
HASH_MDC4 -> HashingAlgorithm.MDC4
HASH_AR_DFP -> HashingAlgorithm.AR_DFP
HASH_SHS -> HashingAlgorithm.SHS
getLength()to obtain the length of a hash value.
KEY_ENC_PAD0 -> KeyPadding.PAD0
KEY_ENC_PADRAND -> KeyPadding.PADRAND
ANSI_MAC -> MACAlgorithm.ANSI
ISO_MAC -> MACAlgorithm.ISO
RIPE_MAC -> MACAlgorithm.RIPE
ENCR_PAD_0PAD -> MessagePadding.0PAD
ENCR_PAD_ISO10126 -> MessagePadding.ISO10126
ENCR_PAD_NOPAD -> MessagePadding.NOPAD
RSA_EXP65537 -> PublicKeySelection.RSA_EXP65537
RSA_EXPRAND -> PublicKeySelection.RSA_EXPRAND
DSS_OLD_COMMON -> PublicKeySelection.DSS_OLD_COMMON
DSS_NEW_COMMON -> PublicKeySelection.DSS_NEW_COMMON
SIG_RSA -> SignAlgorithm.RSA
SIG_DSA -> SignAlgorithm.DSA
SIG_ISO9796 -> SignAlgorithm.ISO9796
SIG_RABIN -> SignAlgorithm.RABIN
implements CryptoConstants" from classes (as CryptoConstants should not be loaded, and is no longer an interface (it's a class now)).
intdeclarations (of instance variables, formal arguments, etc.) which refers to constants has to be changed to the relevant class. Also, Integer casts used to make objects from constants (when inserting in lists, etc.) are no longer needed.
semper.util.constant. It implements toInt() and toString. See semper.util.constant.Constant for details.
Creation date: November 17, 1997 .