4.27 beta

This commit is contained in:
Igor Pavlov
2005-09-21 00:00:00 +00:00
committed by Kornel Lesiński
parent 31e7b924e8
commit d66cf2fcf3
393 changed files with 17345 additions and 4743 deletions

View File

@@ -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