samuser

package module
v0.0.0-...-19aaead Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2025 License: MIT Imports: 7 Imported by: 0

README

SAM User

provides constants and encoding/decoding of Microsoft Security Account Manager (SAM)-related structures.

Currently contains an implementation of the UserParms aka userParameters structure.

License

MIT

Documentation

Overview

Package samuser provides constants and encoding/decoding of Microsoft Security Account Manager (SAM)-related structures.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal(p *UserParams) ([]byte, error)

Marshal marshals UserParams into mangled byte form.

func MarshalUnmangled

func MarshalUnmangled(p *UserParams) ([]byte, error)

MarshalUnmangled marshals UserParams into unmangled byte form.

Types

type UserParams

type UserParams struct {
	// LegacyRASData contains various types of legacy data.
	// Does not seem to be used anymore, do not touch.
	LegacyRASData [96]byte
	// Props contains various named properties.
	Props map[string]Value
	// contains filtered or unexported fields
}

UserParams contains the decoded contents of the UserParms field (now userParameters in LDAP).

func Unmarshal

func Unmarshal(in []byte) (*UserParams, error)

Unmarshal unmarshals UserParams from a mangled input. These can be identified by a "P" at byte 48. Any LDAP-derived inputs are mangled.

func UnmarshalUnmangled

func UnmarshalUnmangled(data []byte) (*UserParams, error)

UnmarshalUnmangled unmarshals UserParams from a regular (non-mangled) input. Can be identified by a "P" at byte 96.

type Value

type Value struct {
	Value []byte
	IsSet bool
}

Value contains a single property value as a byte slice. It also contains a single flag if the value is a set, if this still matters is unknown but it is encoded.

Jump to

Keyboard shortcuts

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