mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-10 08:07:09 -06:00
4.27 beta
This commit is contained in:
committed by
Kornel Lesiński
parent
31e7b924e8
commit
d66cf2fcf3
@@ -42,7 +42,10 @@ namespace NArchive
|
||||
const UInt16 kRecovery = 0x40;
|
||||
const UInt16 kBlockEncryption = 0x80;
|
||||
const UInt16 kFirstVolume = 0x100; // (set only by RAR 3.0 and later)
|
||||
const UInt16 kEncryptVer = 0x200; // RAR 3.6 there is EncryptVer Byte in End of MainHeader
|
||||
|
||||
const int kHeaderSizeMin = 7;
|
||||
|
||||
struct CBlock
|
||||
{
|
||||
UInt16 CRC;
|
||||
@@ -53,9 +56,19 @@ namespace NArchive
|
||||
UInt32 Reserved2;
|
||||
// UInt16 GetRealCRC() const;
|
||||
};
|
||||
|
||||
const int kArchiveHeaderSize = 13;
|
||||
|
||||
const int kBlockHeadersAreEncrypted = 0x80;
|
||||
|
||||
struct CHeader360: public CBlock
|
||||
{
|
||||
Byte EncryptVersion;
|
||||
bool IsEncrypted() const { return (Flags & NHeader::NArchive::kBlockEncryption) != 0; }
|
||||
bool IsThereEncryptVer() const { return (Flags & NHeader::NArchive::kEncryptVer) != 0; }
|
||||
bool IsEncryptOld() const { return (!IsThereEncryptVer() || EncryptVersion < 36); }
|
||||
UInt32 GetBaseSize() const { return kArchiveHeaderSize + (IsEncryptOld() ? 0 : 1); }
|
||||
};
|
||||
}
|
||||
|
||||
namespace NFile
|
||||
|
||||
Reference in New Issue
Block a user