2009-06-25 16:34 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)

* source/rtl/hbmd5.c
    + HB_MD5(), HB_MD5FILE(): New logical parameter added, which
      controls whether to return binary data or hexadecimal string.
      The default is .T. which will return hexa string, to stay
      compatible. Later we should switch the default to .F..

  * mpkg_gnu.bat
    * Updated requirement section.
This commit is contained in:
Viktor Szakats
2009-06-26 14:35:29 +00:00
parent c9731a76a7
commit 066d7497f8
3 changed files with 31 additions and 10 deletions

View File

@@ -17,6 +17,16 @@
past entries belonging to author(s): Viktor Szakats.
*/
2009-06-25 16:34 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* source/rtl/hbmd5.c
+ HB_MD5(), HB_MD5FILE(): New logical parameter added, which
controls whether to return binary data or hexadecimal string.
The default is .T. which will return hexa string, to stay
compatible. Later we should switch the default to .F..
* mpkg_gnu.bat
* Updated requirement section.
2009-06-26 15:52 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/rdd/hsx/hsx.c
* removed ( BYTE * ) casting

View File

@@ -20,8 +20,7 @@ rem or HB_DIR_NSIS envvar set to its dir with an ending backslash.
rem (only for Windows builds)
rem - Info-ZIP zip.exe in PATH
rem https://sourceforge.net/project/showfiles.php?group_id=118012
rem - HB_COMPILER envvar configured (see INSTALL doc)
rem - C compiler and GNU Make configured (see INSTALL doc)
rem - C compiler configured (see INSTALL doc)
rem ---------------------------------------------------------------
if not "%OS%" == "Windows_NT" echo This Harbour build script requires Windows NT or upper.

View File

@@ -378,14 +378,20 @@ HB_FUNC( HB_MD5 )
{
ULONG ulLen = hb_parclen( 1 );
char dststr[ 16 ];
char digest[ 33 ];
hb_md5( pszStr, ulLen, dststr );
hb_md5digest( dststr, digest );
hb_retclen( digest, 32 );
if( ! ISLOG( 2 ) || hb_parl( 2 ) )
{
char digest[ 32 + 1 ];
hb_md5digest( dststr, digest );
hb_retclen( digest, HB_SIZEOFARRAY( digest ) - 1 );
}
else
hb_retclen( dststr, HB_SIZEOFARRAY( dststr ) );
}
else
hb_retc( NULL ); /* return empty string on wrong call */
hb_retc_null(); /* return empty string on wrong call */
}
HB_FUNC( HB_MD5FILE )
@@ -399,13 +405,19 @@ HB_FUNC( HB_MD5FILE )
if( hFile != FS_ERROR )
{
char dststr[ 16 ];
char digest[ 33 ];
hb_md5file( hFile, dststr );
hb_md5digest( dststr, digest );
hb_retclen( digest, 32 );
if( ! ISLOG( 2 ) || hb_parl( 2 ) )
{
char digest[ 32 + 1 ];
hb_md5digest( dststr, digest );
hb_retclen( digest, HB_SIZEOFARRAY( digest ) - 1 );
}
else
hb_retclen( dststr, HB_SIZEOFARRAY( dststr ) );
return;
}
}
hb_retc( NULL ); /* return empty string on wrong call */
hb_retc_null(); /* return empty string on wrong call */
}