X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=src%2Flibhashkit%2Fencrypt.cc;h=e7898a6a3f6a08960ae4584c4e53a20f64b58e8f;hb=b7f446e55146456e368c3926347f4c771afcea8c;hp=dbc051ae2d5e81c9f8b3f4d41763c274bf9adba2;hpb=2aab18117a2b078dd0eb366f3766a1fef06da695;p=awesomized%2Flibmemcached diff --git a/src/libhashkit/encrypt.cc b/src/libhashkit/encrypt.cc index dbc051ae..e7898a6a 100644 --- a/src/libhashkit/encrypt.cc +++ b/src/libhashkit/encrypt.cc @@ -15,12 +15,12 @@ #include "libhashkit/common.h" -#ifdef WITH_OPENSSL +#ifdef HAVE_OPENSSL_CRYPTO # include #endif hashkit_string_st *hashkit_encrypt(hashkit_st *kit, const char *source, size_t source_length) { -#ifdef WITH_OPENSSL +#ifdef HAVE_OPENSSL_CRYPTO return aes_encrypt((encryption_context_t *) kit->_cryptographic_context, (const unsigned char *) source, source_length); #else @@ -30,7 +30,7 @@ hashkit_string_st *hashkit_encrypt(hashkit_st *kit, const char *source, size_t s } hashkit_string_st *hashkit_decrypt(hashkit_st *kit, const char *source, size_t source_length) { -#ifdef WITH_OPENSSL +#ifdef HAVE_OPENSSL_CRYPTO return aes_decrypt((encryption_context_t *) kit->_cryptographic_context, (const unsigned char *) source, source_length); #else @@ -38,7 +38,7 @@ hashkit_string_st *hashkit_decrypt(hashkit_st *kit, const char *source, size_t s #endif } -#ifdef WITH_OPENSSL +#ifdef HAVE_OPENSSL_CRYPTO bool hashkit_key(hashkit_st *kit, const char *key, const size_t key_length) { kit->_cryptographic_context = (encryption_context_t *) malloc(sizeof(encryption_context_t)); ((encryption_context_t *) kit->_cryptographic_context)->encryption_context = EVP_CIPHER_CTX_new(); @@ -61,4 +61,4 @@ bool hashkit_key(hashkit_st *kit, const char *key, const size_t key_length) { return bool(kit->_cryptographic_context); } -#endif \ No newline at end of file +#endif