- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

# 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
    00029 USING_NAMESPACE(CryptoPP)
    00030
    00031 void RegisterFactories()
    00032 {
    00033         static bool s_registered = false;
    00034         if (s_registered)
    00035                 return;
    00036
    00037         RegisterDefaultFactoryFor<SimpleKeyAgreementDomain, DH>();
    00038         RegisterDefaultFactoryFor<HashTransformation, Weak::MD5>();
    00039         RegisterDefaultFactoryFor<HashTransformation, SHA1>();
    00040         RegisterDefaultFactoryFor<HashTransformation, SHA224>();
    00041         RegisterDefaultFactoryFor<HashTransformation, SHA256>();
    00042 #ifdef WORD64_AVAILABLE
    00043         RegisterDefaultFactoryFor<HashTransformation, SHA384>();
    00044         RegisterDefaultFactoryFor<HashTransformation, SHA512>();
    00045         RegisterDefaultFactoryFor<HashTransformation, Whirlpool>();
    00046         RegisterDefaultFactoryFor<HashTransformation, Tiger>();
    00047 #endif
    00048         RegisterDefaultFactoryFor<HashTransformation, RIPEMD160>();
    00049         RegisterDefaultFactoryFor<HashTransformation, RIPEMD320>();
    00050         RegisterDefaultFactoryFor<HashTransformation, RIPEMD128>();
    00051         RegisterDefaultFactoryFor<HashTransformation, RIPEMD256>();
    00052         RegisterDefaultFactoryFor<HashTransformation, Weak::PanamaHash<LittleEndian> >();
    00053         RegisterDefaultFactoryFor<HashTransformation, Weak::PanamaHash<BigEndian> >();
    00054         RegisterDefaultFactoryFor<MessageAuthenticationCode, HMAC<Weak::MD5> >();
    00055         RegisterDefaultFactoryFor<MessageAuthenticationCode, HMAC<SHA1> >();
    00056         RegisterDefaultFactoryFor<MessageAuthenticationCode, HMAC<RIPEMD160> >();
    00057         RegisterDefaultFactoryFor<MessageAuthenticationCode, TTMAC>();
    00058         RegisterDefaultFactoryFor<MessageAuthenticationCode, VMAC<AES> >();
    00059         RegisterDefaultFactoryFor<MessageAuthenticationCode, VMAC<AES, 64> >();
    00060         RegisterDefaultFactoryFor<MessageAuthenticationCode, Weak::PanamaMAC<LittleEndian> >();
    00061         RegisterDefaultFactoryFor<MessageAuthenticationCode, Weak::PanamaMAC<BigEndian> >();
    00062         RegisterAsymmetricCipherDefaultFactories<RSAES<OAEP<SHA1> > >("RSA/OAEP-MGF1(SHA-1)");
    00063         RegisterAsymmetricCipherDefaultFactories<DLIES<> >("DLIES(NoCofactorMultiplication, KDF2(SHA-1), XOR, HMAC(SHA-1), DHAES)");
    00064         RegisterSignatureSchemeDefaultFactories<DSA>("DSA(1363)");
    00065         RegisterSignatureSchemeDefaultFactories<NR<SHA1> >("NR(1363)/EMSA1(SHA-1)");
    00066         RegisterSignatureSchemeDefaultFactories<GDSA<SHA1> >("DSA-1363/EMSA1(SHA-1)");
    00067         RegisterSignatureSchemeDefaultFactories<RSASS<PKCS1v15, Weak::MD2> >("RSA/PKCS1-1.5(MD2)");
    00068         RegisterSignatureSchemeDefaultFactories<RSASS<PKCS1v15, SHA1> >("RSA/PKCS1-1.5(SHA-1)");
    00069         RegisterSignatureSchemeDefaultFactories<ESIGN<SHA1> >("ESIGN/EMSA5-MGF1(SHA-1)");
    00070         RegisterSignatureSchemeDefaultFactories<RWSS<P1363_EMSA2, SHA1> >("RW/EMSA2(SHA-1)");
    00071         RegisterSignatureSchemeDefaultFactories<RSASS<PSS, SHA1> >("RSA/PSS-MGF1(SHA-1)");
    00072         RegisterSymmetricCipherDefaultFactories<SEAL<> >();
    00073         RegisterSymmetricCipherDefaultFactories<ECB_Mode<SHACAL2> >();
    00074         RegisterSymmetricCipherDefaultFactories<ECB_Mode<Camellia> >();
    00075         RegisterSymmetricCipherDefaultFactories<ECB_Mode<TEA> >();
    00076         RegisterSymmetricCipherDefaultFactories<ECB_Mode<XTEA> >();
    00077         RegisterSymmetricCipherDefaultFactories<PanamaCipher<LittleEndian> >();
    00078         RegisterSymmetricCipherDefaultFactories<PanamaCipher<BigEndian> >();
    00079         RegisterSymmetricCipherDefaultFactories<ECB_Mode<AES> >();
    00080         RegisterSymmetricCipherDefaultFactories<CBC_Mode<AES> >();
    00081         RegisterSymmetricCipherDefaultFactories<CFB_Mode<AES> >();
    00082         RegisterSymmetricCipherDefaultFactories<OFB_Mode<AES> >();
    00083         RegisterSymmetricCipherDefaultFactories<CTR_Mode<AES> >();
    00084         RegisterSymmetricCipherDefaultFactories<Salsa20>();
    00085         RegisterSymmetricCipherDefaultFactories<Sosemanuk>();
    00086         RegisterSymmetricCipherDefaultFactories<Weak::MARC4>();
    00087
    00088         s_registered = true;
    00089 }