Added Encrypt/Decrypt functions for doing blowfish CBC - also added some base64 wrapper functions

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@535 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
prozacx
2005-09-26 06:20:52 +00:00
parent a88cea430b
commit 5e4ba2e39f
2 changed files with 68 additions and 5 deletions
+13 -5
View File
@@ -74,13 +74,21 @@ public:
CString Token(unsigned int uPos, bool bRest = false, const CString& sSep = " ") const;
VCString Split(const CString& sDelim, bool bKeepEmpty = true) const;
unsigned int Split(const CString& sDelim, VCString& vsRet, bool bAllowEmpty = true) const;
static CString Format(const CString& sFormatStr, ...);
CString Base64Decode_n() const;
CString Base64Encode_n(unsigned int uWrap = 0) const;
unsigned long Base64Decode(CString& sRet) const;
bool Base64Encode(CString& sRet, unsigned int uWrap = 0) const;
CString MD5() const;
unsigned long Base64Decode(CString& sRet) const;
unsigned long Base64Decode();
CString Base64Decode_n() const;
bool Base64Encode(CString& sRet, unsigned int uWrap = 0) const;
bool Base64Encode(unsigned int uWrap = 0);
CString Base64Encode_n(unsigned int uWrap = 0) const;
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 = "");
static CString ToString(char c);
static CString ToString(unsigned char c);