diff options
author | George Hazan <george.hazan@gmail.com> | 2012-07-03 21:47:03 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-07-03 21:47:03 +0000 |
commit | e412759d7e551e3fc4dc4be6e1fae1cd4f308868 (patch) | |
tree | 00ed12238ba8b3735ddf95cf9e79c48d7c411c78 /plugins/CryptoPP/base64.cpp | |
parent | 0f95cbb4a9f1c9a613dccb9d53f5ddb50a8cadd7 (diff) |
no more PLUGININFOEX::replacesDefaultModule, that old & nasty clutch
since now all Myranda plugins are binary incompatible with Miranda's
git-svn-id: http://svn.miranda-ng.org/main/trunk@743 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/CryptoPP/base64.cpp')
-rw-r--r-- | plugins/CryptoPP/base64.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/plugins/CryptoPP/base64.cpp b/plugins/CryptoPP/base64.cpp index 1a752bc507..7495dd234f 100644 --- a/plugins/CryptoPP/base64.cpp +++ b/plugins/CryptoPP/base64.cpp @@ -1,7 +1,8 @@ #include "commonheaders.h"
-string base64encode(const string buf) {
+string base64encode(const string buf)
+{
string out;
char *base64 = base64encode(buf.data(), buf.length());
out.assign(base64);
@@ -42,7 +43,7 @@ char *base64encode(const char *inBuffer, const int count) { string base64decode(const string buf) {
string out;
- int len = buf.length();
+ size_t len = buf.length();
char *plain = base64decode(buf.data(), &len);
out.assign(plain,len);
free(plain);
@@ -52,7 +53,7 @@ string base64decode(const string buf) { string base64decode(const char *buf) {
string out;
- int len = strlen(buf);
+ size_t len = strlen(buf);
char *plain = base64decode(buf, &len);
out.assign(plain,len);
free(plain);
@@ -60,14 +61,14 @@ string base64decode(const char *buf) { }
-char *base64decode(const char *inBuffer, int *count) {
+char *base64decode(const char *inBuffer, size_t *count) {
int srcIndex = 0, destIndex = 0;
char *outBuffer = (char *) malloc(*count);
while(srcIndex < *count) {
BYTE c0, c1, c2 = 0, c3 = 0;
- const int delta = *count - srcIndex;
+ const size_t delta = *count - srcIndex;
c0 = decode64(inBuffer[srcIndex++]);
c1 = decode64(inBuffer[srcIndex++]);
if (delta > 2) {
|