header

package
v1.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessControlEntryHeader

type AccessControlEntryHeader struct {
	Type  acetype.AccessControlEntryType
	Flags aceflags.AccessControlEntryFlag
	Size  uint16

	// Internal
	RawBytes     []byte
	RawBytesSize uint32
}

AccessControlEntryHeader represents the header of an Access Control Entry (ACE) in a security descriptor. This struct encapsulates the basic information about an ACE, including its type, associated flags, and size.

The struct contains the following fields:

  • Type: An AccessControlEntryType that specifies the type of the ACE (e.g., access allowed, access denied).

  • Flags: An AccessControlEntryFlag that holds flags associated with the ACE, indicating additional properties like inheritance and propagation.

  • Size: A uint16 value representing the size of the ACE header, which is typically used when processing lists of ACEs in a security descriptor.

Internal fields:

  • RawBytes: A byte slice that holds the raw bytes of the ACE header for low-level processing or serialization purposes.

  • RawBytesSize: A uint32 value indicating the actual size of the raw bytes stored in RawBytes.

func (*AccessControlEntryHeader) Describe

func (aceheader *AccessControlEntryHeader) Describe(indent int)

Describe prints a human-readable representation of the AccessControlEntryHeader struct. It displays the type, flags, and size of the access control entry, formatted with indentation to reflect the structure's hierarchy in a tree-like manner.

Parameters:

  • indent: An integer that specifies the level of indentation for the output, allowing for better visualization of nested structures.

func (*AccessControlEntryHeader) Equal

Equal checks if two AccessControlEntryHeader objects are equal by comparing all their fields.

Parameters: - other: The other AccessControlEntryHeader to compare with

Returns: - bool: true if the AccessControlEntryHeaders are equal, false otherwise

func (*AccessControlEntryHeader) Marshal

func (aceheader *AccessControlEntryHeader) Marshal() ([]byte, error)

Marshal serializes the AccessControlEntryHeader struct into a byte slice.

Returns:

  • []byte: The serialized byte slice representing the ACE header.

func (*AccessControlEntryHeader) Unmarshal

func (aceheader *AccessControlEntryHeader) Unmarshal(marshalledData []byte) (int, error)

Unmarshal populates the AccessControlEntryHeader struct fields from the provided raw byte slice. It extracts the ACE type, flags, and size from the raw byte data. The raw bytes are expected to follow the ACE structure format, where the first byte represents the ACE type, the second byte represents the flags, and the next two bytes represent the size of the ACE.

Parameters:

  • rawBytes: A byte slice containing the raw data from which to parse the ACE header. It must be at least 4 bytes long to avoid index out of range errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL