- Main Page
- Namespaces
- Classes
- Files

# regtest.cpp

    00001 #include "factory.h"
    00002
    00003 #define CRYPTOPP_ENABLE_NAMESPACE_WEAK 1
    00004 #include "modes.h"
    00005 #include "dh.h"
    00006 #include "esign.h"
    00007 #include "md2.h"
    00008 #include "rw.h"
    00009 #include "md5.h"
    00010 #include "rsa.h"
    00011 #include "ripemd.h"
    00012 #include "dsa.h"
    00013 #include "seal.h"
    00014 #include "whrlpool.h"
    00015 #include "ttmac.h"
    00016 #include "camellia.h"
    00017 #include "shacal2.h"
    00018 #include "tea.h"
    00019 #include "panama.h"
    00020 #include "pssr.h"
    00021 #include "aes.h"
    00022 #include "salsa.h"
    00023 #include "vmac.h"
    00024 #include "tiger.h"
    00025 #include "md5.h"
    00026 #include "sosemanuk.h"
    00027 #include "arc4.h"
    00028 #include "ccm.h"
    00029 #include "gcm.h"
    00030 #include "eax.h"
    00031 #include "twofish.h"
    00032 #include "serpent.h"
    00033 #include "cast.h"
    00034 #include "rc6.h"
    00035 #include "mars.h"
    00036 #include "shacal2.h"
    00037 #include "des.h"
    00038 #include "idea.h"
    00039 #include "rc5.h"
    00040 #include "tea.h"
    00041 #include "skipjack.h"
    00042 #include "cmac.h"
    00043 #include "dmac.h"
    00044 #include "blowfish.h"
    00045 #include "seed.h"
    00046 #include "wake.h"
    00047 #include "seal.h"
    00048 #include "crc.h"
    00049 #include "adler32.h"
    00050
    00051 USING_NAMESPACE(CryptoPP)
    00052
    00053 void RegisterFactories()
    00054 {
    00055         static bool s_registered = false;
    00056         if (s_registered)
    00057                 return;
    00058
    00059         RegisterDefaultFactoryFor<SimpleKeyAgreementDomain, DH>();
    00060         RegisterDefaultFactoryFor<HashTransformation, CRC32>();
    00061         RegisterDefaultFactoryFor<HashTransformation, Adler32>();
    00062         RegisterDefaultFactoryFor<HashTransformation, Weak::MD5>();
    00063         RegisterDefaultFactoryFor<HashTransformation, SHA1>();
    00064         RegisterDefaultFactoryFor<HashTransformation, SHA224>();
    00065         RegisterDefaultFactoryFor<HashTransformation, SHA256>();
    00066         RegisterDefaultFactoryFor<HashTransformation, SHA384>();
    00067         RegisterDefaultFactoryFor<HashTransformation, SHA512>();
    00068         RegisterDefaultFactoryFor<HashTransformation, Whirlpool>();
    00069         RegisterDefaultFactoryFor<HashTransformation, Tiger>();
    00070         RegisterDefaultFactoryFor<HashTransformation, RIPEMD160>();
    00071         RegisterDefaultFactoryFor<HashTransformation, RIPEMD320>();
    00072         RegisterDefaultFactoryFor<HashTransformation, RIPEMD128>();
    00073         RegisterDefaultFactoryFor<HashTransformation, RIPEMD256>();
    00074         RegisterDefaultFactoryFor<HashTransformation, Weak::PanamaHash<LittleEndian> >();
    00075         RegisterDefaultFactoryFor<HashTransformation, Weak::PanamaHash<BigEndian> >();
    00076         RegisterDefaultFactoryFor<MessageAuthenticationCode, HMAC<Weak::MD5> >();
    00077         RegisterDefaultFactoryFor<MessageAuthenticationCode, HMAC<SHA1> >();
    00078         RegisterDefaultFactoryFor<MessageAuthenticationCode, HMAC<RIPEMD160> >();
    00079         RegisterDefaultFactoryFor<MessageAuthenticationCode, TTMAC>();
    00080         RegisterDefaultFactoryFor<MessageAuthenticationCode, VMAC<AES> >();
    00081         RegisterDefaultFactoryFor<MessageAuthenticationCode, VMAC<AES, 64> >();
    00082         RegisterDefaultFactoryFor<MessageAuthenticationCode, Weak::PanamaMAC<LittleEndian> >();
    00083         RegisterDefaultFactoryFor<MessageAuthenticationCode, Weak::PanamaMAC<BigEndian> >();
    00084         RegisterDefaultFactoryFor<MessageAuthenticationCode, CMAC<AES> >();
    00085         RegisterDefaultFactoryFor<MessageAuthenticationCode, DMAC<AES> >();
    00086         RegisterDefaultFactoryFor<MessageAuthenticationCode, CMAC<DES_EDE3> >();
    00087         RegisterAsymmetricCipherDefaultFactories<RSAES<OAEP<SHA1> > >("RSA/OAEP-MGF1(SHA-1)");
    00088         RegisterAsymmetricCipherDefaultFactories<DLIES<> >("DLIES(NoCofactorMultiplication, KDF2(SHA-1), XOR, HMAC(SHA-1), DHAES)");
    00089         RegisterSignatureSchemeDefaultFactories<DSA>("DSA(1363)");
    00090         RegisterSignatureSchemeDefaultFactories<NR<SHA1> >("NR(1363)/EMSA1(SHA-1)");
    00091         RegisterSignatureSchemeDefaultFactories<GDSA<SHA1> >("DSA-1363/EMSA1(SHA-1)");
    00092         RegisterSignatureSchemeDefaultFactories<RSASS<PKCS1v15, Weak::MD2> >("RSA/PKCS1-1.5(MD2)");
    00093         RegisterSignatureSchemeDefaultFactories<RSASS<PKCS1v15, SHA1> >("RSA/PKCS1-1.5(SHA-1)");
    00094         RegisterSignatureSchemeDefaultFactories<ESIGN<SHA1> >("ESIGN/EMSA5-MGF1(SHA-1)");
    00095         RegisterSignatureSchemeDefaultFactories<RWSS<P1363_EMSA2, SHA1> >("RW/EMSA2(SHA-1)");
    00096         RegisterSignatureSchemeDefaultFactories<RSASS<PSS, SHA1> >("RSA/PSS-MGF1(SHA-1)");
    00097         RegisterSymmetricCipherDefaultFactories<SEAL<> >();
    00098         RegisterSymmetricCipherDefaultFactories<ECB_Mode<SHACAL2> >();
    00099         RegisterSymmetricCipherDefaultFactories<ECB_Mode<Camellia> >();
    00100         RegisterSymmetricCipherDefaultFactories<ECB_Mode<TEA> >();
    00101         RegisterSymmetricCipherDefaultFactories<ECB_Mode<XTEA> >();
    00102         RegisterSymmetricCipherDefaultFactories<PanamaCipher<LittleEndian> >();
    00103         RegisterSymmetricCipherDefaultFactories<PanamaCipher<BigEndian> >();
    00104         RegisterSymmetricCipherDefaultFactories<ECB_Mode<AES> >();
    00105         RegisterSymmetricCipherDefaultFactories<CBC_Mode<AES> >();
    00106         RegisterSymmetricCipherDefaultFactories<CFB_Mode<AES> >();
    00107         RegisterSymmetricCipherDefaultFactories<OFB_Mode<AES> >();
    00108         RegisterSymmetricCipherDefaultFactories<CTR_Mode<AES> >();
    00109         RegisterSymmetricCipherDefaultFactories<Salsa20>();
    00110         RegisterSymmetricCipherDefaultFactories<XSalsa20>();
    00111         RegisterSymmetricCipherDefaultFactories<Sosemanuk>();
    00112         RegisterSymmetricCipherDefaultFactories<Weak::MARC4>();
    00113         RegisterSymmetricCipherDefaultFactories<WAKE_OFB<LittleEndian> >();
    00114         RegisterSymmetricCipherDefaultFactories<SEAL<LittleEndian> >();
    00115         RegisterAuthenticatedSymmetricCipherDefaultFactories<CCM<AES> >();
    00116         RegisterAuthenticatedSymmetricCipherDefaultFactories<GCM<AES> >();
    00117         RegisterAuthenticatedSymmetricCipherDefaultFactories<EAX<AES> >();
    00118         RegisterSymmetricCipherDefaultFactories<CTR_Mode<Camellia> >();
    00119         RegisterSymmetricCipherDefaultFactories<CTR_Mode<Twofish> >();
    00120         RegisterSymmetricCipherDefaultFactories<CTR_Mode<Serpent> >();
    00121         RegisterSymmetricCipherDefaultFactories<CTR_Mode<CAST256> >();
    00122         RegisterSymmetricCipherDefaultFactories<CTR_Mode<RC6> >();
    00123         RegisterSymmetricCipherDefaultFactories<CTR_Mode<MARS> >();
    00124         RegisterSymmetricCipherDefaultFactories<CTR_Mode<SHACAL2> >();
    00125         RegisterSymmetricCipherDefaultFactories<CTR_Mode<DES> >();
    00126         RegisterSymmetricCipherDefaultFactories<CTR_Mode<DES_XEX3> >();
    00127         RegisterSymmetricCipherDefaultFactories<CTR_Mode<DES_EDE3> >();
    00128         RegisterSymmetricCipherDefaultFactories<CTR_Mode<IDEA> >();
    00129         RegisterSymmetricCipherDefaultFactories<CTR_Mode<RC5> >();
    00130         RegisterSymmetricCipherDefaultFactories<CTR_Mode<TEA> >();
    00131         RegisterSymmetricCipherDefaultFactories<CTR_Mode<XTEA> >();
    00132         RegisterSymmetricCipherDefaultFactories<CTR_Mode<CAST128> >();
    00133         RegisterSymmetricCipherDefaultFactories<CTR_Mode<SKIPJACK> >();
    00134         RegisterSymmetricCipherDefaultFactories<CTR_Mode<Blowfish> >();
    00135         RegisterSymmetricCipherDefaultFactories<ECB_Mode<SEED> >();
    00136         RegisterSymmetricCipherDefaultFactories<CTR_Mode<SEED> >();
    00137
    00138         s_registered = true;
    00139 }