phphelper

package
v0.0.0-...-8aeec60 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UnPHPSerializeToAnyAnyMap

func UnPHPSerializeToAnyAnyMap(s string) (map[any]any, error)

func UnPHPSerializeToStrAnyMap

func UnPHPSerializeToStrAnyMap(s string) (map[string]any, error)

func UnPHPSerializeToStruct

func UnPHPSerializeToStruct[T any](s string) (r T, err error)

UnPHPSerializeToStruct 使用 json tag

Types

type PasswordHash

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

PasswordHash 目前还不完善,只有 Encode64 getRandomBytes CryptPrivate 方法能用

func NewPasswordHash

func NewPasswordHash(iterationCountLog2 int, portableHashes bool) *PasswordHash

func (*PasswordHash) CheckPassword

func (p *PasswordHash) CheckPassword(pass, hash string) bool

func (*PasswordHash) CryptPrivate

func (p *PasswordHash) CryptPrivate(password, set string) (rr string, err error)

func (*PasswordHash) Encode64

func (p *PasswordHash) Encode64(input string, count int) (out string)

func (*PasswordHash) HashPassword

func (p *PasswordHash) HashPassword(pass string) (r string, err error)

Jump to

Keyboard shortcuts

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