From a50644dd8a5edc2485b6ec62c5dfd28e9e0d7ac2 Mon Sep 17 00:00:00 2001 From: prozacx Date: Mon, 26 Sep 2005 06:28:57 +0000 Subject: [PATCH] Added ifdefs for HAVE_LIBSSL git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@536 726aef4b-f618-498e-8847-2d620e286838 --- String.cpp | 2 ++ String.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/String.cpp b/String.cpp index a1388027..00e934e3 100644 --- a/String.cpp +++ b/String.cpp @@ -621,6 +621,7 @@ CString CString::MD5() const { return (const char*) CMD5(*this); } +#ifdef HAVE_LIBSSL CString CString::Encrypt_n(const CString& sPass, const CString& sIvec) { CString sRet; sRet.Encrypt(sPass, sIvec); @@ -665,6 +666,7 @@ void CString::Crypt(const CString& sPass, bool bEncrypt, const CString& sIvec) { append((const char*) szBuff, uLen); free(szBuff); } +#endif // HAVE_LIBSSL CString CString::ToString(char c) { stringstream s; s << c; return s.str(); } CString CString::ToString(unsigned char c) { stringstream s; s << c; return s.str(); } diff --git a/String.h b/String.h index 56409025..302b672b 100644 --- a/String.h +++ b/String.h @@ -84,11 +84,13 @@ public: bool Base64Encode(unsigned int uWrap = 0); CString Base64Encode_n(unsigned int uWrap = 0) const; +#ifdef HAVE_LIBSSL CString Encrypt_n(const CString& sPass, const CString& sIvec = ""); CString Decrypt_n(const CString& sPass, const CString& sIvec = ""); void Encrypt(const CString& sPass, const CString& sIvec = ""); void Decrypt(const CString& sPass, const CString& sIvec = ""); void Crypt(const CString& sPass, bool bEncrypt, const CString& sIvec = ""); +#endif static CString ToString(char c); static CString ToString(unsigned char c);