summaryrefslogtreecommitdiff
path: root/plugins/CryptoPP
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/CryptoPP')
-rw-r--r--plugins/CryptoPP/src/base64.cpp2
-rw-r--r--plugins/CryptoPP/src/base64.h2
-rw-r--r--plugins/CryptoPP/src/cpp_gpgw.cpp4
-rw-r--r--plugins/CryptoPP/src/cpp_pgpw.cpp2
4 files changed, 5 insertions, 5 deletions
diff --git a/plugins/CryptoPP/src/base64.cpp b/plugins/CryptoPP/src/base64.cpp
index 7495dd234f..92f23ba64b 100644
--- a/plugins/CryptoPP/src/base64.cpp
+++ b/plugins/CryptoPP/src/base64.cpp
@@ -11,7 +11,7 @@ string base64encode(const string buf)
}
-char *base64encode(const char *inBuffer, const int count) {
+char *base64encode(const char *inBuffer, const size_t count) {
int srcIndex = 0, destIndex = 0, remainder = count % 3;
char *outBuffer = (char *) malloc(count*2+1);
diff --git a/plugins/CryptoPP/src/base64.h b/plugins/CryptoPP/src/base64.h
index 1024ecbbd7..8be9cbc4fa 100644
--- a/plugins/CryptoPP/src/base64.h
+++ b/plugins/CryptoPP/src/base64.h
@@ -44,7 +44,7 @@ static const byte asciiToBin64[] =
static const byte binToAscii64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-char *base64encode(const char *, const int);
+char *base64encode(const char *, const size_t);
char *base64decode(const char *, size_t *);
string base64encode(const string);
diff --git a/plugins/CryptoPP/src/cpp_gpgw.cpp b/plugins/CryptoPP/src/cpp_gpgw.cpp
index 0ef3d77626..e6a5899fc2 100644
--- a/plugins/CryptoPP/src/cpp_gpgw.cpp
+++ b/plugins/CryptoPP/src/cpp_gpgw.cpp
@@ -240,7 +240,7 @@ LPSTR __cdecl gpg_encode(HANDLE context, LPCSTR szPlainMsg)
LPSTR szUtfMsg;
if ( ptr->mode & MODE_GPG_ANSI ) {
LPWSTR wszMsg = utf8decode(szPlainMsg);
- size_t wlen = wcslen(wszMsg)+1;
+ int wlen = (int)wcslen(wszMsg)+1;
szUtfMsg = (LPSTR) alloca(wlen);
WideCharToMultiByte(CP_ACP, 0, wszMsg, -1, szUtfMsg, wlen, 0, 0);
}
@@ -261,7 +261,7 @@ LPSTR __cdecl gpg_decode(HANDLE context, LPCSTR szEncMsg)
if (szOldMsg) {
if ( !is_7bit_string(szOldMsg) && !is_utf8_string(szOldMsg) ) {
- size_t slen = strlen(szOldMsg)+1;
+ int slen = (int)strlen(szOldMsg)+1;
LPWSTR wszMsg = (LPWSTR) alloca(slen*sizeof(WCHAR));
MultiByteToWideChar(CP_ACP, 0, szOldMsg, -1, wszMsg, slen*sizeof(WCHAR));
szNewMsg = _strdup(utf8encode(wszMsg));
diff --git a/plugins/CryptoPP/src/cpp_pgpw.cpp b/plugins/CryptoPP/src/cpp_pgpw.cpp
index 8633690009..7a70a99607 100644
--- a/plugins/CryptoPP/src/cpp_pgpw.cpp
+++ b/plugins/CryptoPP/src/cpp_pgpw.cpp
@@ -258,7 +258,7 @@ LPSTR __cdecl pgp_decode(HANDLE context, LPCSTR szEncMsg)
if (szOldMsg) {
if ( !is_7bit_string(szOldMsg) && !is_utf8_string(szOldMsg) ) {
- size_t slen = strlen(szOldMsg)+1;
+ int slen = (int)strlen(szOldMsg)+1;
LPWSTR wszMsg = (LPWSTR) alloca(slen*sizeof(WCHAR));
MultiByteToWideChar(CP_ACP, 0, szOldMsg, -1, wszMsg, slen*sizeof(WCHAR));
szNewMsg = _strdup(utf8encode(wszMsg));