hashid

package
v0.0.0-...-e336ece Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HashID

type HashID struct {
	*hashids.HashID
}

func NewHashID

func NewHashID(salt string, minLength int) HashID

NewHashID returns a new HashID.

func NewHashIDE

func NewHashIDE(salt string, minLength int) (HashID, error)

NewHashIDE returns a new hash ID or error.

func (HashID) Decrypt

func (h HashID) Decrypt(hash string) []int

Decrypt 解密.

func (HashID) DecryptE

func (h HashID) DecryptE(hash string) ([]int, error)

DecryptE 解密.

func (HashID) Encrypt

func (h HashID) Encrypt(params ...int) string

Encrypt 加密.

func (HashID) EncryptE

func (h HashID) EncryptE(params ...int) (string, error)

EncryptE 加密.

Jump to

Keyboard shortcuts

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