SA-MP/saco/checksums.cpp

21 lines
411 B
C++
Raw Normal View History

2024-02-21 19:16:31 +08:00
#include <stdio.h>
#include <windows.h>
#include "fhicl-sha1.h"
//----------------------------------------------------------
void CalcSHA1(char *data, unsigned int len, unsigned int *digest)
2024-02-21 19:16:31 +08:00
{
fhicl::SHA1 sha1;
memset(digest, 0, sizeof(unsigned int) * 5);
2024-02-21 19:16:31 +08:00
if(IsBadReadPtr(data, len)) return;
sha1.Input(data, len);
sha1.Result(digest);
2024-02-21 19:16:31 +08:00
}
//----------------------------------------------------------