util

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const MagicKeySalt = "tox"

Variables

View Source
var (
	Name        = "@isayme/tox"
	Version     = "unknown"
	BuildTime   = "unknown"
	GitRevision = "unknown"
)

version info

Functions

func CopyBuffer added in v0.2.1

func CopyBuffer(dst io.Writer, src io.Reader) (written int64, err error)

Copy copy with default buf

func EnableProfiling

func EnableProfiling(enabled bool)

func FormatURL

func FormatURL(s string) (string, error)

func GenerateJwtToken

func GenerateJwtToken(key []byte) (string, error)

func HashedPassword added in v0.2.0

func HashedPassword(password string) string

func KDF

func KDF(password string, salt []byte, keySize int) []byte

func NewTimeoutConn

func NewTimeoutConn(conn net.Conn, timeout time.Duration) *timeoutConn

NewTimeoutConn create timeout conn

func NextNonce

func NextNonce(nonce []byte)

func NowInMills

func NowInMills() int64

func PrintVersion

func PrintVersion()

PrintVersion print version

func Stringify

func Stringify(v interface{}) string

func ValidateJwtToken

func ValidateJwtToken(tokenString string, key []byte) error

Types

type LocalConn added in v0.2.4

type LocalConn interface {
	io.Reader
	io.Writer
	io.Closer
	CloseWrite() error
}

type ServerConn added in v0.2.4

type ServerConn interface {
	io.Reader
	io.Writer
	CloseWrite() error
}

Jump to

Keyboard shortcuts

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