2020-11-11 00:13:09 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "views/view.hpp"
|
|
|
|
|
|
|
|
#include <cstdio>
|
|
|
|
|
2020-11-11 09:18:35 +01:00
|
|
|
#include "providers/provider.hpp"
|
|
|
|
|
2020-11-11 00:13:09 +01:00
|
|
|
namespace hex {
|
|
|
|
|
|
|
|
class ViewHashes : public View {
|
|
|
|
public:
|
2020-11-11 09:18:35 +01:00
|
|
|
ViewHashes(prv::Provider* &dataProvider);
|
2020-11-11 00:13:09 +01:00
|
|
|
virtual ~ViewHashes();
|
|
|
|
|
|
|
|
virtual void createView() override;
|
|
|
|
virtual void createMenu() override;
|
|
|
|
|
|
|
|
private:
|
2020-11-11 09:18:35 +01:00
|
|
|
prv::Provider* &m_dataProvider;
|
2020-11-11 00:13:09 +01: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" };
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|