userdb

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NTHash

func NTHash(password string) [16]byte

NTHash returns the NTLM NT hash of the password: MD4(UTF-16LE(password)).

Types

type DB

type DB struct {
	// contains filtered or unexported fields
}

func New

func New() *DB

func (*DB) AddHash

func (db *DB) AddHash(name string, hash [16]byte, systemUser string, shares []string) error

func (*DB) AddPlaintext

func (db *DB) AddPlaintext(name, password, systemUser string, shares []string) error

func (*DB) Len

func (db *DB) Len() int

func (*DB) Lookup

func (db *DB) Lookup(name string) (User, bool)

type User

type User struct {
	Name        string
	NTHash      [16]byte
	SystemUser  string
	AllowShares []string
}

Jump to

Keyboard shortcuts

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