mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-26 19:33:31 +00:00
[RAPPS] Rework application handling
Previously, there would be function duplication between installed and available applications. Now this is handled with polymorphism, which allows to re-use a lot of code. Additionally, toolbar buttons are properly disabled now. The mutex used to guard rapps' single instance is renamed, so that the 'new' and old rapps can be run at the same time for testing. CORE-18459
This commit is contained in:
@@ -3,14 +3,15 @@
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: Various integrity check mechanisms
|
||||
* COPYRIGHT: Copyright Ismael Ferreras Morezuelas ([email protected])
|
||||
* Copyright Mark Jansen
|
||||
* Copyright 2016 Mark Jansen <[email protected]>
|
||||
*/
|
||||
|
||||
#include "rapps.h"
|
||||
|
||||
#include <sha1.h>
|
||||
|
||||
BOOL VerifyInteg(LPCWSTR lpSHA1Hash, LPCWSTR lpFileName)
|
||||
BOOL
|
||||
VerifyInteg(LPCWSTR lpSHA1Hash, LPCWSTR lpFileName)
|
||||
{
|
||||
BOOL ret = FALSE;
|
||||
|
||||
@@ -48,7 +49,7 @@ BOOL VerifyInteg(LPCWSTR lpSHA1Hash, LPCWSTR lpFileName)
|
||||
|
||||
WCHAR buf[(sizeof(sha) * 2) + 1];
|
||||
for (UINT i = 0; i < sizeof(sha); i++)
|
||||
swprintf(buf + 2 * i, L"%02x", ((unsigned char *) sha)[i]);
|
||||
swprintf(buf + 2 * i, L"%02x", ((unsigned char *)sha)[i]);
|
||||
/* does the resulting SHA1 match with the provided one? */
|
||||
if (!_wcsicmp(buf, lpSHA1Hash))
|
||||
ret = TRUE;
|
||||
|
||||
Reference in New Issue
Block a user