24f3f43457
add version_info and icon sections in "export to windows platform". add version_info and icon to godot exe file (editor & template exe). fix an problem in image class. change all default icons to android export icon (a little more rounded). create an python script for convert file to cpp byte array for use in 'splash.h'.
30 lines
826 B
C++
30 lines
826 B
C++
#pragma once
|
|
#include <istream>
|
|
#include "pe_base.h"
|
|
|
|
namespace pe_bliss
|
|
{
|
|
class entropy_calculator
|
|
{
|
|
public:
|
|
//Calculates entropy for PE image section
|
|
static double calculate_entropy(const section& s);
|
|
|
|
//Calculates entropy for istream (from current position of stream)
|
|
static double calculate_entropy(std::istream& file);
|
|
|
|
//Calculates entropy for data block
|
|
static double calculate_entropy(const char* data, size_t length);
|
|
|
|
//Calculates entropy for this PE file (only section data)
|
|
static double calculate_entropy(const pe_base& pe);
|
|
|
|
private:
|
|
entropy_calculator();
|
|
entropy_calculator(const entropy_calculator&);
|
|
entropy_calculator& operator=(const entropy_calculator&);
|
|
|
|
//Calculates entropy from bytes count
|
|
static double calculate_entropy(const uint32_t byte_count[256], std::streamoff total_length);
|
|
};
|
|
}
|