mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-30 21:05:56 -05:00
ui/ux: Complete rewrite of the Hash view
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <hex/api/content_registry.hpp>
|
||||
|
||||
#include <hex/ui/view.hpp>
|
||||
|
||||
#include <array>
|
||||
@@ -16,35 +18,10 @@ namespace hex::plugin::builtin {
|
||||
void drawContent() override;
|
||||
|
||||
private:
|
||||
enum class HashFunctions
|
||||
{
|
||||
Crc8,
|
||||
Crc16,
|
||||
Crc32,
|
||||
Md5,
|
||||
Sha1,
|
||||
Sha224,
|
||||
Sha256,
|
||||
Sha384,
|
||||
Sha512
|
||||
};
|
||||
ContentRegistry::Hashes::Hash *m_selectedHash = nullptr;
|
||||
std::string m_newHashName;
|
||||
|
||||
bool m_shouldInvalidate = true;
|
||||
int m_currHashFunction = 0;
|
||||
u64 m_hashRegion[2] = { 0 };
|
||||
bool m_shouldMatchSelection = false;
|
||||
|
||||
static constexpr std::array hashFunctionNames {
|
||||
std::pair {HashFunctions::Crc8, "CRC8" },
|
||||
std::pair { HashFunctions::Crc16, "CRC16" },
|
||||
std::pair { HashFunctions::Crc32, "CRC32" },
|
||||
std::pair { HashFunctions::Md5, "MD5" },
|
||||
std::pair { HashFunctions::Sha1, "SHA-1" },
|
||||
std::pair { HashFunctions::Sha224, "SHA-224"},
|
||||
std::pair { HashFunctions::Sha256, "SHA-256"},
|
||||
std::pair { HashFunctions::Sha384, "SHA-384"},
|
||||
std::pair { HashFunctions::Sha512, "SHA-512"},
|
||||
};
|
||||
std::vector<ContentRegistry::Hashes::Hash::Function> m_hashFunctions;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user