mirror of
https://github.com/SabreTools/SabreTools.Models.git
synced 2026-09-23 07:06:17 +00:00
Add a couple missing extra field structures
This commit is contained in:
33
SabreTools.Models/PKZIP/AesEncryptionStructure.cs
Normal file
33
SabreTools.Models/PKZIP/AesEncryptionStructure.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
namespace SabreTools.Models.PKZIP
|
||||
{
|
||||
/// <summary>
|
||||
/// WinZip AES encryption data
|
||||
/// </summary>
|
||||
/// <remarks>Header ID = 0x9901</remarks>
|
||||
/// <see href="https://github.com/adamhathcock/sharpcompress/blob/master/src/SharpCompress/Common/Zip/Headers/LocalEntryHeaderExtraFactory.cs"/>
|
||||
public class AesEncryptionStructure : ExtensibleDataField
|
||||
{
|
||||
/// <summary>
|
||||
/// Compression type
|
||||
/// </summary>
|
||||
/// <remarks>Values 0f 0x01 and 0x02 are accepted</remarks>
|
||||
public ushort CompressionType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Vendor ID
|
||||
/// </summary>
|
||||
/// <remarks>Should be 0x4541</remarks>
|
||||
public ushort VendorID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Unknown
|
||||
/// </summary>
|
||||
/// <remarks>This value is unreferenced</remarks>
|
||||
public byte Unknown { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Compression method
|
||||
/// </summary>
|
||||
public CompressionMethod CompressionMethod { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1002,6 +1002,18 @@ namespace SabreTools.Models.PKZIP
|
||||
*/
|
||||
}
|
||||
|
||||
[Flags]
|
||||
public enum RecordedTimeFlag : byte
|
||||
{
|
||||
None = 0,
|
||||
|
||||
LastModified = 1,
|
||||
|
||||
LastAccessed = 2,
|
||||
|
||||
Created = 4,
|
||||
}
|
||||
|
||||
[Flags]
|
||||
public enum ZipItInternalSettings : ushort
|
||||
{
|
||||
|
||||
33
SabreTools.Models/PKZIP/ExtendedTimestampExtraField.cs
Normal file
33
SabreTools.Models/PKZIP/ExtendedTimestampExtraField.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
namespace SabreTools.Models.PKZIP
|
||||
{
|
||||
/// <summary>
|
||||
/// The unix modified time, last access time, and creation time, if set
|
||||
/// </summary>
|
||||
/// <remarks>Header ID = 0x5455</remarks>
|
||||
/// <see href="https://github.com/adamhathcock/sharpcompress/blob/master/src/SharpCompress/Common/Zip/Headers/LocalEntryHeaderExtraFactory.cs"/>
|
||||
public class ExtendedTimestampExtraField : ExtensibleDataField
|
||||
{
|
||||
/// <summary>
|
||||
/// Indicates what tiemstamps are included
|
||||
/// </summary>
|
||||
public RecordedTimeFlag Flags { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Last modified time
|
||||
/// </summary>
|
||||
/// <remarks>Only available when <see cref="RecordedTimeFlag.LastModified"/> is set</remarks>
|
||||
public uint? LastModified { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Last accessed time
|
||||
/// </summary>
|
||||
/// <remarks>Only available when <see cref="RecordedTimeFlag.LastAccessed"/> is set</remarks>
|
||||
public uint? LastAccessed { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Created on time
|
||||
/// </summary>
|
||||
/// <remarks>Only available when <see cref="RecordedTimeFlag.Created"/> is set</remarks>
|
||||
public uint? CreatedOn { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user