tokenkit

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_EXPIRED time.Duration = 60 * time.Minute

const INTERVAL string = "|||"

Variables

This section is empty.

Functions

func Sign

func Sign(publicKeyText string, pwd string, salt string, signedTime int64) (string, error)

func SignNow

func SignNow(publicKeyText string, password string, salt string) (string, error)

func Verify

func Verify(token string, privateKeyText string, pwd string, salt string, expired int64) error

func VerifyNow

func VerifyNow(token string, privateKeyText string, password string, salt string) error

Types

type TokenStruct

type TokenStruct struct {
	Pwd  string `json:"pwd"`
	Salt string `json:"salt"`
	Time int64  `json:"time"`
}

Jump to

Keyboard shortcuts

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