| 173 | |
| 174 | |
| 175 | struct FileHeader:BlockHeader |
| 176 | { |
| 177 | byte HostOS; |
| 178 | uint UnpVer; // It is 1 byte in RAR29 and bit field in RAR5. |
| 179 | byte Method; |
| 180 | union { |
| 181 | uint FileAttr; |
| 182 | uint SubFlags; |
| 183 | }; |
| 184 | wchar FileName[NM]; |
| 185 | |
| 186 | Array<byte> SubData; |
| 187 | |
| 188 | RarTime mtime; |
| 189 | RarTime ctime; |
| 190 | RarTime atime; |
| 191 | |
| 192 | int64 PackSize; |
| 193 | int64 UnpSize; |
| 194 | int64 MaxSize; // Reserve packed and unpacked size bytes for vint of this size. |
| 195 | |
| 196 | HashValue FileHash; |
| 197 | |
| 198 | uint FileFlags; |
| 199 | |
| 200 | bool SplitBefore; |
| 201 | bool SplitAfter; |
| 202 | |
| 203 | bool UnknownUnpSize; |
| 204 | |
| 205 | bool Encrypted; |
| 206 | CRYPT_METHOD CryptMethod; |
| 207 | bool SaltSet; |
| 208 | byte Salt[SIZE_SALT50]; |
| 209 | byte InitV[SIZE_INITV]; |
| 210 | bool UsePswCheck; |
| 211 | byte PswCheck[SIZE_PSWCHECK]; |
| 212 | |
| 213 | // Use HMAC calculated from HashKey and checksum instead of plain checksum. |
| 214 | bool UseHashKey; |
| 215 | |
| 216 | // Key to convert checksum to HMAC. Derived from password with PBKDF2 |
| 217 | // using additional iterations. |
| 218 | byte HashKey[SHA256_DIGEST_SIZE]; |
| 219 | |
| 220 | uint Lg2Count; // Log2 of PBKDF2 repetition count. |
| 221 | |
| 222 | bool Solid; |
| 223 | bool Dir; |
| 224 | bool CommentInHeader; // RAR 2.0 file comment. |
| 225 | bool Version; // name.ext;ver file name containing the version number. |
| 226 | size_t WinSize; |
| 227 | bool Inherited; // New file inherits a subblock when updating a host file (for subblocks only). |
| 228 | |
| 229 | // 'true' if file sizes use 8 bytes instead of 4. Not used in RAR 5.0. |
| 230 | bool LargeFile; |
| 231 | |
| 232 | // 'true' for HEAD_SERVICE block, which is a child of preceding file block. |
nothing calls this directly
no outgoing calls
no test coverage detected