lm

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LMHash

func LMHash(password string) [16]byte

LMHash computes the LAN Manager hash of a password string The LM hash is computed as follows: 1. Convert password to uppercase and pad/truncate to 14 bytes 2. Split into two 7-byte halves 3. Create two DES keys from each 7-byte half (convert 7 bytes to 8 bytes adding parity bits) 4. DES encrypt the constant "KGS!@#$%" with each key 5. Concatenate the two DES outputs

func LMHashToHex

func LMHashToHex(password string) string

LMHashToHex converts the LM hash to a lowercase hex string

The LM hash is converted to a hex string by encoding the hash as a lowercase hex string

Returns the lowercase hex string representation of the LM hash

func LMOWFv1 added in v1.0.3

func LMOWFv1(Passwd, User, UserDom string) [16]byte

LMOWFv1, this is the same as LMHash Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-nlmp/464551a8-9fc4-428e-b3d3-bc5bfb2e73a5

Types

This section is empty.

Jump to

Keyboard shortcuts

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