mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-08 10:07:02 -06:00
Make Upper- or lowercase hash output an option. (fix #177)
This commit is contained in:
@@ -9,6 +9,10 @@
|
||||
#include "../../Common/FileStreams.h"
|
||||
#include "../../Common/StreamUtils.h"
|
||||
|
||||
#ifdef WANT_OPTIONAL_LOWERCASE
|
||||
#include "../FileManager/RegistryUtils.h"
|
||||
#endif
|
||||
|
||||
#include "EnumDirItems.h"
|
||||
#include "HashCalc.h"
|
||||
|
||||
@@ -309,10 +313,15 @@ HRESULT HashCalc(
|
||||
return callback->AfterLastFile(hb);
|
||||
}
|
||||
|
||||
|
||||
static inline char GetHex(unsigned v)
|
||||
{
|
||||
return (char)((v < 10) ? ('0' + v) : ('a' + (v - 10)));
|
||||
#ifdef WANT_OPTIONAL_LOWERCASE
|
||||
if (WantLowercaseHashes())
|
||||
{
|
||||
return (char)((v < 10) ? ('0' + v) : ('a' + (v - 10)));
|
||||
}
|
||||
#endif
|
||||
return (char)((v < 10) ? ('0' + v) : ('A' + (v - 10)));
|
||||
}
|
||||
|
||||
void AddHashHexToString(char *dest, const Byte *data, UInt32 size)
|
||||
|
||||
Reference in New Issue
Block a user