flhash

package
v0.106.1 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2025 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FLFACTIONHASH_POLYNOMIAL = 0x1021
)

Variables

This section is empty.

Functions

func NotSimplePopulateTable added in v0.85.0

func NotSimplePopulateTable(poly uint32, t *[256]uint32)

Copied foundation from golang crc32 that had SimplePopulate And then modified to how it should at Python version given by Alex Matches also Laz version in C# i think

func SaveFile

func SaveFile(name string) string

Types

type FactionNickHasher added in v0.85.0

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

NicknameHasher implements the hashing algorithm used by item, base, etc. nicknames

func NewFactionHasher added in v0.85.0

func NewFactionHasher() *FactionNickHasher

func (*FactionNickHasher) Hash added in v0.85.0

func (h *FactionNickHasher) Hash(name string) HashCode

func (*FactionNickHasher) RawHash added in v0.85.0

func (h *FactionNickHasher) RawHash(data []byte) uint32

Function for calculating the Freelancer data nickname hash. Algorithm from flhash.exe by sherlog@t-online.de (2003-06-11)

type HashCode

type HashCode int

func HashFaction added in v0.85.0

func HashFaction(name string) HashCode

func HashNickname

func HashNickname(name string) HashCode

func (HashCode) ToHexStr added in v0.84.0

func (h HashCode) ToHexStr() string

func (HashCode) ToIntStr added in v0.84.0

func (h HashCode) ToIntStr() string

func (HashCode) ToUintStr added in v0.84.0

func (h HashCode) ToUintStr() string

type NameHash

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

NameHash implements the hashing algorithm used by the account folders and save files.

func NewNameHasher

func NewNameHasher() *NameHash

func (*NameHash) Hash

func (h *NameHash) Hash(name string) uint32

func (*NameHash) RawHash

func (h *NameHash) RawHash(data []byte) uint32

Function for calculating the Freelancer data nickname hash. Algorithm from flhash.exe by sherlog@t-online.de (2003-06-11)

func (*NameHash) SaveFile

func (h *NameHash) SaveFile(name string) string

type NicknameHasher

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

NicknameHasher implements the hashing algorithm used by item, base, etc. nicknames

func NewHasher

func NewHasher() *NicknameHasher

func (*NicknameHasher) Hash

func (h *NicknameHasher) Hash(name string) HashCode

func (*NicknameHasher) RawHash

func (h *NicknameHasher) RawHash(data []byte) uint32

Function for calculating the Freelancer data nickname hash. Algorithm from flhash.exe by sherlog@t-online.de (2003-06-11)

Jump to

Keyboard shortcuts

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