2008-07-15 20:37 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

* harbour/source/rtl/hbmd5.c
    ! fixed MD5 calculations
This commit is contained in:
Przemyslaw Czerpak
2008-07-15 18:37:35 +00:00
parent b33f79ec8b
commit 18f8cb9feb
2 changed files with 7 additions and 3 deletions

View File

@@ -8,6 +8,10 @@
2008-12-31 13:59 UTC+0100 Foo Bar <foo.bar@foobar.org>
*/
2008-07-15 20:37 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/rtl/hbmd5.c
! fixed MD5 calculations
2008-07-15 14:31 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/contrib/hbmysql/Makefile
* harbour/contrib/hbodbc/Makefile

View File

@@ -9,7 +9,7 @@
* Copyright 2004 Dmitry V. Korzhov <dk@april26.spb.ru>
*
* Copyright 2007 Przemyslaw Czerpak <druzus / at / priv.onet.pl>
* updated and for current Harbour code, other then x86@32 machines,
* updated for current Harbour code, other then x86@32 machines,
* files and buffers longer then 2^32 and some fixes
*
* www - http://www.harbour-project.org
@@ -297,7 +297,7 @@ HB_EXPORT void hb_md5( BYTE * ucData, ULONG ulLen, BYTE * ucDigest )
memcpy( buf + n, pad, 64 );
/* count bits length */
i = 56;
if( n > 56 )
if( n >= 56 )
{
i += 64;
memcpy( md5.buf, buf, 64 );
@@ -350,7 +350,7 @@ HB_EXPORT void hb_md5file( FHANDLE hFile, BYTE * ucDigest )
memcpy( buf, readbuf + i, n );
memcpy( buf + n, pad, 64 );
i = 56;
if( n > 56 )
if( n >= 56 )
{
i += 64;
memcpy( md5.buf, buf, 64 );