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