forked from Dadoum/zsign-Windows
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmacho.h
32 lines (27 loc) · 720 Bytes
/
macho.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#pragma once
#include "archo.h"
class ZMachO
{
public:
ZMachO();
~ZMachO();
public:
bool Init(const char *szFile);
bool InitV(const char *szFormatPath, ...);
bool Free();
void PrintInfo();
bool Sign(ZSignAsset *pSignAsset, bool bForce, string strBundleId, string strInfoPlistSHA1, string strInfoPlistSHA256, const string &strCodeResourcesData);
bool InjectDyLib(bool bWeakInject, const char *szDyLibPath, bool &bCreate);
private:
bool OpenFile(const char *szPath);
bool CloseFile();
bool NewArchO(uint8_t *pBase, uint32_t uLength);
void FreeArchOes();
bool ReallocCodeSignSpace();
private:
size_t m_sSize;
string m_strFile;
uint8_t *m_pBase;
bool m_bCSRealloced;
vector<ZArchO *> m_arrArchOes;
};