@@ -290,7 +290,7 @@ void MD5::update(const unsigned char input[], size_type length)
290290// for convenience provide a verson with signed char
291291void MD5::update (const char input[], size_type length)
292292{
293- update (( const unsigned char *) input, length);
293+ update (reinterpret_cast < const unsigned char *>( input) , length);
294294}
295295
296296// ////////////////////////////
@@ -299,14 +299,14 @@ void MD5::update(const char input[], size_type length)
299299// the message digest and zeroizing the context.
300300MD5& MD5::finalize ()
301301{
302- static unsigned char padding[64 ] = {
303- 0x80 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
304- 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
305- 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0
306- };
307-
308302 if (!finalized)
309303 {
304+ static unsigned char padding[64 ] = {
305+ 0x80 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
306+ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
307+ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0
308+ };
309+
310310 // Save number of bits
311311 unsigned char bits[8 ];
312312 encode (bits, count, 8 );
0 commit comments