mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
public: optimize MD5_Print function.
This commit is contained in:
committed by
Alibek Omarov
parent
5cdb35f508
commit
23ea7ecbcc
@@ -438,16 +438,12 @@ transform hash to hexadecimal printable symbols
|
||||
char *MD5_Print( byte hash[16] )
|
||||
{
|
||||
static char szReturn[64];
|
||||
char szChunk[10];
|
||||
int i;
|
||||
|
||||
memset( szReturn, 0, 64 );
|
||||
|
||||
for( i = 0; i < 16; i++ )
|
||||
{
|
||||
Q_snprintf( szChunk, sizeof( szChunk ), "%02X", hash[i] );
|
||||
Q_strncat( szReturn, szChunk, sizeof( szReturn ));
|
||||
}
|
||||
COM_Hex2String( hash[i], &szReturn[i * 2] );
|
||||
|
||||
return szReturn;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user