Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | 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
    00022 USING_NAMESPACE(CryptoPP)
    00023
    00024 void RegisterFactories()
    00025 {
    00026         static bool s_registered = false;
    00027         if (s_registered)
    00028                 return;
    00029
    00030         RegisterDefaultFactoryFor<SimpleKeyAgreementDomain, DH>();
    00031         RegisterDefaultFactoryFor<HashTransformation, SHA1>();
    00032         RegisterDefaultFactoryFor<HashTransformation, SHA224>();
    00033         RegisterDefaultFactoryFor<HashTransformation, SHA256>();
    00034 #ifdef WORD64_AVAILABLE
    00035         RegisterDefaultFactoryFor<HashTransformation, SHA384>();
    00036         RegisterDefaultFactoryFor<HashTransformation, SHA512>();
    00037         RegisterDefaultFactoryFor<HashTransformation, Whirlpool>();
    00038 #endif
    00039         RegisterDefaultFactoryFor<HashTransformation, PanamaHash<LittleEndian> >();
    00040         RegisterDefaultFactoryFor<HashTransformation, PanamaHash<BigEndian> >();
    00041         RegisterDefaultFactoryFor<MessageAuthenticationCode, HMAC<MD5> >();
    00042         RegisterDefaultFactoryFor<MessageAuthenticationCode, HMAC<SHA1> >();
    00043         RegisterDefaultFactoryFor<MessageAuthenticationCode, HMAC<RIPEMD160> >();
    00044         RegisterDefaultFactoryFor<MessageAuthenticationCode, TTMAC>();
    00045         RegisterDefaultFactoryFor<MessageAuthenticationCode, PanamaMAC<LittleEndian> >();
    00046         RegisterDefaultFactoryFor<MessageAuthenticationCode, PanamaMAC<BigEndian> >();
    00047         RegisterAsymmetricCipherDefaultFactories<RSAES<OAEP<SHA1> > >("RSA/OAEP-MGF1(SHA-1)");
    00048         RegisterAsymmetricCipherDefaultFactories<DLIES<> >("DLIES(NoCofactorMultiplication, KDF2(SHA-1), XOR, HMAC(SHA-1), DHAES)");
    00049         RegisterSignatureSchemeDefaultFactories<DSA>("DSA(1363)");
    00050         RegisterSignatureSchemeDefaultFactories<NR<SHA1> >("NR(1363)/EMSA1(SHA-1)");
    00051         RegisterSignatureSchemeDefaultFactories<GDSA<SHA1> >("DSA-1363/EMSA1(SHA-1)");
    00052         RegisterSignatureSchemeDefaultFactories<RSASS<PKCS1v15, MD2> >("RSA/PKCS1-1.5(MD2)");
    00053         RegisterSignatureSchemeDefaultFactories<RSASS<PKCS1v15, SHA1> >("RSA/PKCS1-1.5(SHA-1)");
    00054         RegisterSignatureSchemeDefaultFactories<ESIGN<SHA1> >("ESIGN/EMSA5-MGF1(SHA-1)");
    00055         RegisterSignatureSchemeDefaultFactories<RWSS<P1363_EMSA2, SHA1> >("RW/EMSA2(SHA-1)");
    00056         RegisterSignatureSchemeDefaultFactories<RSASS<PSS, SHA1> >("RSA/PSS-MGF1(SHA-1)");
    00057         RegisterSymmetricCipherDefaultFactories<SEAL<> >();
    00058         RegisterSymmetricCipherDefaultFactories<ECB_Mode<SHACAL2> >();
    00059 #ifdef WORD64_AVAILABLE
    00060         RegisterSymmetricCipherDefaultFactories<ECB_Mode<Camellia> >();
    00061 #endif
    00062         RegisterSymmetricCipherDefaultFactories<ECB_Mode<TEA> >();
    00063         RegisterSymmetricCipherDefaultFactories<ECB_Mode<XTEA> >();
    00064         RegisterSymmetricCipherDefaultFactories<PanamaCipher<LittleEndian> >();
    00065         RegisterSymmetricCipherDefaultFactories<PanamaCipher<BigEndian> >();
    00066
    00067         s_registered = true;
    00068 }