summaryrefslogtreecommitdiff
path: root/src/utils/base64.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/base64.cpp')
-rw-r--r--src/utils/base64.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/utils/base64.cpp b/src/utils/base64.cpp
index bd20496b3..57bc68a7c 100644
--- a/src/utils/base64.cpp
+++ b/src/utils/base64.cpp
@@ -180,7 +180,8 @@ std::string encodeBase64String(std::string value)
int sz = 0;
const unsigned char *const str = reinterpret_cast<unsigned char*>(
const_cast<char*>(value.c_str()));
- unsigned char *const buf = php3_base64_encode(str, value.size(), &sz);
+ unsigned char *const buf = php3_base64_encode(
+ str, static_cast<int>(value.size()), &sz);
if (!buf)
return std::string();
@@ -194,7 +195,8 @@ std::string decodeBase64String(std::string value)
int sz = 0;
const unsigned char *const str = reinterpret_cast<unsigned char*>(
const_cast<char*>(value.c_str()));
- unsigned char *const buf = php3_base64_decode(str, value.size(), &sz);
+ unsigned char *const buf = php3_base64_decode(
+ str, static_cast<int>(value.size()), &sz);
if (buf)
value = std::string(reinterpret_cast<char*>(buf), sz);