mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 22:47:29 +08:00
[saco] Match and rename SHA1_HashData to CalcSHA1
This commit is contained in:
parent
0a59142702
commit
bff06cfeec
@ -5,19 +5,16 @@
|
|||||||
|
|
||||||
//----------------------------------------------------------
|
//----------------------------------------------------------
|
||||||
|
|
||||||
void SHA1_HashData(PCHAR szData, DWORD dwLen, DWORD *pdwDigest)
|
void CalcSHA1(char *data, unsigned int len, unsigned int *digest)
|
||||||
{
|
{
|
||||||
fhicl::SHA1 sha1;
|
fhicl::SHA1 sha1;
|
||||||
|
|
||||||
for(int i = 0; i < 5; i++) {
|
memset(digest, 0, sizeof(unsigned int) * 5);
|
||||||
pdwDigest[i] = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!IsBadReadPtr(szData, dwLen))
|
if(IsBadReadPtr(data, len)) return;
|
||||||
{
|
|
||||||
sha1.Input(szData, dwLen);
|
sha1.Input(data, len);
|
||||||
sha1.Result((unsigned int*)pdwDigest);
|
sha1.Result(digest);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------
|
//----------------------------------------------------------
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
|
|
||||||
//----------------------------------------------------------
|
//----------------------------------------------------------
|
||||||
|
|
||||||
void SHA1_HashData(PCHAR szData, DWORD dwLen, DWORD *pdwDigest);
|
void CalcSHA1(char *data, unsigned int len, unsigned int *digest);
|
||||||
|
|
||||||
//----------------------------------------------------------
|
//----------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user