Add pinned APFS FUSE source and guarded read-only NAS probe

这个提交包含在:
mac 于 2026-11-11 22:07:35 +08:00 提交
1 父节点 08e7da7f23
当前提交 737773eb76
111 个文件已更改
+26555 -3

没有与搜索条件相匹配的文件

+39
查看文件
@@ -0,0 +1,39 @@
#pragma once
#include <cstdint>
#include <fstream>
#include <Crypto/Aes.h>
#include "Device.h"
class DiskImageFile
{
public:
DiskImageFile();
~DiskImageFile();
bool Open(const char *name);
void Close();
void Reset();
void Read(uint64_t off, void *data, size_t size);
uint64_t GetContentSize() const { return m_crypt_size; }
bool CheckSetupEncryption();
private:
bool SetupEncryptionV1();
bool SetupEncryptionV2();
size_t PkcsUnpad(const uint8_t *data, size_t size);
std::ifstream m_image;
bool m_is_encrypted;
uint64_t m_crypt_offset;
uint64_t m_crypt_size;
uint32_t m_crypt_blocksize;
uint8_t m_hmac_key[0x14];
AES m_aes;
};