- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

# regtest.cpp

    00001 #include "factory.h"
    00002
    00003 #include "modes.h"
    00004 #include "dh.h"
    00005 #include "esign.h"
    00006 #include "md2.h"
    00007 #include "trunhash.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
    00023 USING_NAMESPACE(CryptoPP)
    00024
    00025 void RegisterFactories()
    00026 {
    00027         static bool s_registered = false;
    00028         if (s_registered)
    00029                 return;
    00030
    00031         RegisterDefaultFactoryFor<SimpleKeyAgreementDomain, DH>();
    00032         RegisterDefaultFactoryFor<HashTransformation, SHA1>();
    00033         RegisterDefaultFactoryFor<HashTransformation, SHA224>();
    00034         RegisterDefaultFactoryFor<HashTransformation, SHA256>();
    00035 #ifdef WORD64_AVAILABLE
    00036         RegisterDefaultFactoryFor<HashTransformation, SHA384>();
    00037         RegisterDefaultFactoryFor<HashTransformation, SHA512>();
    00038         RegisterDefaultFactoryFor<HashTransformation, Whirlpool>();
    00039 #endif
    00040         RegisterDefaultFactoryFor<HashTransformation, PanamaHash<LittleEndian> >();
    00041         RegisterDefaultFactoryFor<HashTransformation, PanamaHash<BigEndian> >();
    00042         RegisterDefaultFactoryFor<MessageAuthenticationCode, HMAC<MD5> >();
    00043         RegisterDefaultFactoryFor<MessageAuthenticationCode, HMAC<SHA1> >();
    00044         RegisterDefaultFactoryFor<MessageAuthenticationCode, HMAC<RIPEMD160> >();
    00045         RegisterDefaultFactoryFor<MessageAuthenticationCode, TTMAC>();
    00046         RegisterDefaultFactoryFor<MessageAuthenticationCode, PanamaMAC<LittleEndian> >();
    00047         RegisterDefaultFactoryFor<MessageAuthenticationCode, PanamaMAC<BigEndian> >();
    00048         RegisterAsymmetricCipherDefaultFactories<RSAES<OAEP<SHA1> > >("RSA/OAEP-MGF1(SHA-1)");
    00049         RegisterAsymmetricCipherDefaultFactories<DLIES<> >("DLIES(NoCofactorMultiplication, KDF2(SHA-1), XOR, HMAC(SHA-1), DHAES)");
    00050         RegisterSignatureSchemeDefaultFactories<DSA>("DSA(1363)");
    00051         RegisterSignatureSchemeDefaultFactories<NR<SHA1> >("NR(1363)/EMSA1(SHA-1)");
    00052         RegisterSignatureSchemeDefaultFactories<GDSA<SHA1> >("DSA-1363/EMSA1(SHA-1)");
    00053         RegisterSignatureSchemeDefaultFactories<RSASS<PKCS1v15, MD2> >("RSA/PKCS1-1.5(MD2)");
    00054         RegisterSignatureSchemeDefaultFactories<RSASS<PKCS1v15, SHA1> >("RSA/PKCS1-1.5(SHA-1)");
    00055         RegisterSignatureSchemeDefaultFactories<ESIGN<SHA1> >("ESIGN/EMSA5-MGF1(SHA-1)");
    00056         RegisterSignatureSchemeDefaultFactories<RWSS<P1363_EMSA2, SHA1> >("RW/EMSA2(SHA-1)");
    00057         RegisterSignatureSchemeDefaultFactories<RSASS<PSS, SHA1> >("RSA/PSS-MGF1(SHA-1)");
    00058         RegisterSymmetricCipherDefaultFactories<SEAL<> >();
    00059         RegisterSymmetricCipherDefaultFactories<ECB_Mode<SHACAL2> >();
    00060 #ifdef WORD64_AVAILABLE
    00061         RegisterSymmetricCipherDefaultFactories<ECB_Mode<Camellia> >();
    00062 #endif
    00063         RegisterSymmetricCipherDefaultFactories<ECB_Mode<TEA> >();
    00064         RegisterSymmetricCipherDefaultFactories<ECB_Mode<XTEA> >();
    00065         RegisterSymmetricCipherDefaultFactories<PanamaCipher<LittleEndian> >();
    00066         RegisterSymmetricCipherDefaultFactories<PanamaCipher<BigEndian> >();
    00067         RegisterSymmetricCipherDefaultFactories<ECB_Mode<AES> >();
    00068         RegisterSymmetricCipherDefaultFactories<CBC_Mode<AES> >();
    00069         RegisterSymmetricCipherDefaultFactories<CFB_Mode<AES> >();
    00070         RegisterSymmetricCipherDefaultFactories<OFB_Mode<AES> >();
    00071         RegisterSymmetricCipherDefaultFactories<CTR_Mode<AES> >();
    00072
    00073         s_registered = true;
    00074 }