encrypt

package
v0.0.0-...-0cc84fb Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenPasswordHash

func GenPasswordHash(password []byte) ([]byte, error)

hash加密

func Md5

func Md5(str []byte) string

func ValidatePasswordHash

func ValidatePasswordHash(password string, hashed string) bool

hash校验

Types

type Sqids

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

func InitSqids

func InitSqids(config SqidsConfig) *Sqids

func (*Sqids) DeAdminUserId

func (s *Sqids) DeAdminUserId(id string) (int64, error)

func (*Sqids) DePlatformUserId

func (s *Sqids) DePlatformUserId(id string) (int64, error)

func (*Sqids) DeUserDeviceSwitch

func (s *Sqids) DeUserDeviceSwitch(id string) (int, error)

func (*Sqids) EnAdminUserId

func (s *Sqids) EnAdminUserId(userId int64) (string, error)

func (*Sqids) EnPlatformUserId

func (s *Sqids) EnPlatformUserId(userId int64) (string, error)

func (*Sqids) EnUserDeviceSwitch

func (s *Sqids) EnUserDeviceSwitch(deviceId int) (string, error)

type SqidsConfig

type SqidsConfig struct {
	UserDeviceSwitch string `json:",optional"`
	PlatformUserId   string `json:",optional"`
	AdminUserId      string `json:",optional"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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