common

package
v0.0.0-...-6daa40f Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: AGPL-3.0 Imports: 12 Imported by: 2

Documentation

Index

Constants

View Source
const Alphabet = "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM0123456789"
View Source
const Alphabet64Grpc = "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM0123456789_."

Variables

View Source
var Base62Encoder, _ = basex.NewEncoding(Alphabet)
View Source
var Base64GrpcEncoder, _ = basex.NewEncoding(Alphabet64Grpc)
View Source
var IntSize = 32 << (^uint(0) >> 63)

Functions

func Abs64

func Abs64(a int64) int64

func BytesIncBigEndian

func BytesIncBigEndian(b []byte)

func BytesIncLittleEndian

func BytesIncLittleEndian(b []byte)

func EVPBytesToKey

func EVPBytesToKey(password string, keyLen int) (key []byte)

func HeadOverlap

func HeadOverlap(p, b []byte) bool

func HmacMD5

func HmacMD5(key []byte, data []byte) []byte

func HmacSHA1

func HmacSHA1(key []byte, data []byte) []byte

func MD5Sum

func MD5Sum(d []byte) []byte

func Max

func Max(a, b int) int

func Min

func Min(a, b int) int

func ResolveUDPAddr

func ResolveUDPAddr(resolver *net.Resolver, hostport string) (*net.UDPAddr, error)

func SHA1Sum

func SHA1Sum(d []byte) []byte

func StringToUUID5

func StringToUUID5(str string) string

StringToUUID5 is from https://github.com/XTLS/Xray-core/issues/158

func StringsHas

func StringsHas(strs []string, str string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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