utils

package
v2.0.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2019 License: MIT Imports: 11 Imported by: 6

Documentation

Index

Constants

View Source
const (
	AUTH_PLAIN    = "plain"
	AUTH_APOP     = "apop"
	AUTH_CRAM_MD5 = "cram-md5"
)

Variables

This section is empty.

Functions

func CheckAndFixUtf8

func CheckAndFixUtf8(data string) string

check invalid utf-8 symbols

func CheckProtocolAuthPass

func CheckProtocolAuthPass(authMethod, rawPassword, cramPassword, cramSecret string) bool

func DecodeBase64

func DecodeBase64(b64 string) string

func DecodeProtocolAuthPlain

func DecodeProtocolAuthPlain(b64 string) (string, string, string)

func DecodeProtocolCramMd5

func DecodeProtocolCramMd5(b64 string) (string, string)

func EncodeBase64

func EncodeBase64(b64 string) string

func GenerateProtocolCramMd5

func GenerateProtocolCramMd5(hostname string) string

func GenerateRandString

func GenerateRandString(l int) string

func GetRandFromArray

func GetRandFromArray(arr []int) int

Types

This section is empty.

Jump to

Keyboard shortcuts

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