The unified diff between revisions [92f17752..] and [11a5f681..] is displayed below. It can also be downloaded as a raw diff.
This diff has been restricted to the following files: 'src/base64.cpp'
#
#
# patch "src/base64.cpp"
# from [8d918bef9cbdb8575869a12d33e31cfe74b12cd4]
# to [178162b698183af4daf3b07ad533bf5480e8e811]
#
============================================================
--- src/base64.cpp 8d918bef9cbdb8575869a12d33e31cfe74b12cd4
+++ src/base64.cpp 178162b698183af4daf3b07ad533bf5480e8e811
@@ -1,6 +1,6 @@
/*************************************************
* Base64 Encoder/Decoder Source File *
-* (C) 1999-2006 The Botan Project *
+* (C) 1999-2007 Jack Lloyd *
*************************************************/
#include <botan/base64.h>
@@ -147,9 +147,9 @@ void Base64_Decoder::decode(const byte i
*************************************************/
void Base64_Decoder::decode(const byte in[4], byte out[3])
{
- out[0] = (byte)((BASE64_TO_BIN[in[0]] << 2) | (BASE64_TO_BIN[in[1]] >> 4));
- out[1] = (byte)((BASE64_TO_BIN[in[1]] << 4) | (BASE64_TO_BIN[in[2]] >> 2));
- out[2] = (byte)((BASE64_TO_BIN[in[2]] << 6) | (BASE64_TO_BIN[in[3]]));
+ out[0] = ((BASE64_TO_BIN[in[0]] << 2) | (BASE64_TO_BIN[in[1]] >> 4));
+ out[1] = ((BASE64_TO_BIN[in[1]] << 4) | (BASE64_TO_BIN[in[2]] >> 2));
+ out[2] = ((BASE64_TO_BIN[in[2]] << 6) | (BASE64_TO_BIN[in[3]]));
}
/*************************************************
@@ -176,7 +176,8 @@ void Base64_Decoder::handle_bad_char(byt
return;
throw Decoding_Error(
- std::string("Base64_Decoder: Invalid base64 character '") + (char)c + "'"
+ std::string("Base64_Decoder: Invalid base64 character '") +
+ static_cast<char>(c) + "'"
);
}