2013-03-05 07:32:27 +01:00
|
|
|
#include "cipher/BlockCipher.h"
|
|
|
|
|
2013-03-05 07:39:51 +01:00
|
|
|
#include "base/config.h"
|
|
|
|
|
|
|
|
#ifdef WITH_OPENSSL
|
2013-03-05 07:32:27 +01:00
|
|
|
#include "cipher/openssl.h"
|
2013-03-05 07:39:51 +01:00
|
|
|
#endif
|
|
|
|
#ifdef WITH_COMMON_CRYPTO
|
|
|
|
#include "cipher/CommonCrypto.h"
|
|
|
|
#endif
|
|
|
|
|
2013-03-05 07:36:32 +01:00
|
|
|
#include "cipher/NullCiphers.h"
|
2013-03-05 07:32:27 +01:00
|
|
|
|
|
|
|
namespace encfs {
|
|
|
|
|
|
|
|
Registry<BlockCipher>& BlockCipher::GetRegistry()
|
|
|
|
{
|
|
|
|
static Registry<BlockCipher> registry;
|
|
|
|
static bool first = true;
|
|
|
|
if (first)
|
|
|
|
{
|
2013-03-05 07:39:51 +01:00
|
|
|
#ifdef WITH_OPENSSL
|
2013-03-05 07:32:27 +01:00
|
|
|
OpenSSL::registerCiphers();
|
2013-03-05 07:39:51 +01:00
|
|
|
#endif
|
|
|
|
#ifdef WITH_COMMON_CRYPTO
|
|
|
|
CommonCrypto::registerCiphers();
|
|
|
|
#endif
|
2013-03-05 07:36:32 +01:00
|
|
|
NullCiphers::registerCiphers();
|
2013-03-05 07:32:27 +01:00
|
|
|
first = false;
|
|
|
|
}
|
|
|
|
return registry;
|
|
|
|
}
|
|
|
|
|
|
|
|
BlockCipher::BlockCipher()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
BlockCipher::~BlockCipher()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace encfs
|
|
|
|
|