New upstream version 24.0.1+dfsg1
This commit is contained in:
parent
b14f9eae6d
commit
5a730d6ec3
842 changed files with 42245 additions and 33385 deletions
|
|
@ -26,7 +26,7 @@ void HashToString(const uint8_t *in, wchar_t *out)
|
|||
const wchar_t alphabet[] = L"0123456789abcdef";
|
||||
|
||||
for (int i = 0; i != BLAKE2_HASH_LENGTH; ++i) {
|
||||
out[2 * i] = alphabet[in[i] / 16];
|
||||
out[2 * i] = alphabet[in[i] / 16];
|
||||
out[2 * i + 1] = alphabet[in[i] % 16];
|
||||
}
|
||||
|
||||
|
|
@ -35,7 +35,7 @@ void HashToString(const uint8_t *in, wchar_t *out)
|
|||
|
||||
void StringToHash(const wchar_t *in, BYTE *out)
|
||||
{
|
||||
int temp;
|
||||
unsigned int temp;
|
||||
|
||||
for (int i = 0; i < BLAKE2_HASH_LENGTH; i++) {
|
||||
swscanf_s(in + i * 2, L"%02x", &temp);
|
||||
|
|
@ -50,7 +50,7 @@ bool CalculateFileHash(const wchar_t *path, BYTE *hash)
|
|||
return false;
|
||||
|
||||
WinHandle handle = CreateFileW(path, GENERIC_READ, FILE_SHARE_READ,
|
||||
nullptr, OPEN_EXISTING, 0, nullptr);
|
||||
nullptr, OPEN_EXISTING, 0, nullptr);
|
||||
if (handle == INVALID_HANDLE_VALUE)
|
||||
return false;
|
||||
|
||||
|
|
@ -60,7 +60,7 @@ bool CalculateFileHash(const wchar_t *path, BYTE *hash)
|
|||
for (;;) {
|
||||
DWORD read = 0;
|
||||
if (!ReadFile(handle, buf.data(), (DWORD)buf.size(), &read,
|
||||
nullptr))
|
||||
nullptr))
|
||||
return false;
|
||||
|
||||
if (!read)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue