summaryrefslogtreecommitdiff
path: root/plugins/CryptoPP/src/cpp_keys.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-06-16 14:52:30 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-06-16 14:52:30 +0000
commit061047f67b695296a39a65df4a24916def1f67d5 (patch)
tree1b8b26385c66a0605e1a2688b23d68ea4558b32a /plugins/CryptoPP/src/cpp_keys.cpp
parent16883b99a9de3b600bb7cc0bd42317249e74f2df (diff)
custom (and also buggy) base64 processing code replaced with the core functions
git-svn-id: http://svn.miranda-ng.org/main/trunk@4987 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/CryptoPP/src/cpp_keys.cpp')
-rw-r--r--plugins/CryptoPP/src/cpp_keys.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/CryptoPP/src/cpp_keys.cpp b/plugins/CryptoPP/src/cpp_keys.cpp
index b216eb6a2f..c1b2d9efb5 100644
--- a/plugins/CryptoPP/src/cpp_keys.cpp
+++ b/plugins/CryptoPP/src/cpp_keys.cpp
@@ -59,7 +59,7 @@ LPSTR __cdecl cpp_init_keya(HANDLE context, int features) {
SAFE_FREE(ptr->tmp);
if (ptr->mode & MODE_BASE64 || features & FEATURES_NEWPG)
- ptr->tmp = base64encode((LPSTR)&publ1,KEYSIZE+2);
+ ptr->tmp = mir_base64_encode(publ1,KEYSIZE+2);
else
ptr->tmp = base16encode((LPSTR)&publ1,KEYSIZE+2);
@@ -73,14 +73,14 @@ int __cdecl cpp_init_keyb(HANDLE context, LPCSTR key) {
pCNTX ptr = get_context_on_id(context); if (!ptr) return 0;
pSIMDATA p = (pSIMDATA) cpp_alloc_pdata(ptr);
- size_t clen = rtrim(key);
+ unsigned clen = (unsigned)rtrim(key);
ptr->features = 0;
LPSTR pub_binary;
if ((clen==KEYSIZE*2) || (clen==(KEYSIZE+2)*2))
pub_binary = base16decode(key,&clen);
else
- pub_binary = base64decode(key,&clen);
+ pub_binary = (LPSTR)mir_base64_decode(key,&clen);
if ( !pub_binary || (clen!=KEYSIZE && clen!=KEYSIZE+2) ) {
#if defined(_DEBUG) || defined(NETLIB_LOG)