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-11-11 08:28:44 +00:00
|
|
|
explicit ViewHashes(prv::Provider* &dataProvider);
|
|
|
|
~ViewHashes() override;
|
2020-11-10 23:13:09 +00:00
|
|
|
|
2020-11-11 08:28:44 +00:00
|
|
|
void createView() override;
|
|
|
|
void createMenu() override;
|
2020-11-10 23:13:09 +00:00
|
|
|
|
|
|
|
private:
|
2020-11-11 08:18:35 +00:00
|
|
|
prv::Provider* &m_dataProvider;
|
2020-11-10 23:13:09 +00:00
|
|
|
bool m_windowOpen = true;
|
|
|
|
|
|
|
|
int m_currHashFunction = 0;
|
|
|
|
int m_hashStart = 0, m_hashEnd = 0;
|
|
|
|
static constexpr const char* HashFunctionNames[] = { "CRC16", "CRC32", "MD5", "SHA-1", "SHA-256" };
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|