2020-11-10 23:13:09 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "views/view.hpp"
|
|
|
|
|
|
|
|
#include <cstdio>
|
|
|
|
|
|
|
|
namespace hex {
|
|
|
|
|
2020-11-11 08:28:44 +00:00
|
|
|
namespace prv { class Provider; }
|
|
|
|
|
2020-11-10 23:13:09 +00:00
|
|
|
class ViewHashes : public View {
|
|
|
|
public:
|
2020-12-27 14:39:06 +00:00
|
|
|
explicit ViewHashes();
|
2020-11-11 08:28:44 +00:00
|
|
|
~ViewHashes() override;
|
2020-11-10 23:13:09 +00:00
|
|
|
|
2020-12-22 17:10:01 +00:00
|
|
|
void drawContent() override;
|
|
|
|
void drawMenu() override;
|
2020-11-10 23:13:09 +00:00
|
|
|
|
|
|
|
private:
|
2020-11-12 08:38:52 +00:00
|
|
|
bool m_shouldInvalidate = true;
|
2020-11-10 23:13:09 +00:00
|
|
|
int m_currHashFunction = 0;
|
2020-11-28 14:53:11 +00:00
|
|
|
u64 m_hashRegion[2] = { 0 };
|
|
|
|
bool m_shouldMatchSelection = false;
|
|
|
|
|
2020-11-12 11:00:50 +00:00
|
|
|
static constexpr const char* HashFunctionNames[] = { "CRC16", "CRC32", "MD4", "MD5", "SHA-1", "SHA-224", "SHA-256", "SHA-384", "SHA-512" };
|
2020-11-10 23:13:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|