util

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2020 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeBase64

func DecodeBase64(value string) (string, error)

func DecryptAES

func DecryptAES(key []byte, cipherText []byte) ([]byte, error)

参考自:https://golang.org/pkg/crypto/cipher/#example_NewCFBDecrypter

func EncodeBase64

func EncodeBase64(value string) string

func EncodeFileMD5

func EncodeFileMD5(path string) (string, error)

func EncodeFileSha1

func EncodeFileSha1(path string) (string, error)

func EncodeFileSha256

func EncodeFileSha256(path string) (string, error)

func EncodeMD5

func EncodeMD5(value string) string

func EncryptAES

func EncryptAES(key []byte, plainText []byte) ([]byte, error)

参考自:https://golang.org/pkg/crypto/cipher/#example_NewCFBEncrypter

func GetExecutePath

func GetExecutePath() (string, error)

func JsonParse

func JsonParse(data []byte, dist interface{}) error

func JsonParseFromFile

func JsonParseFromFile(path string, dist interface{}) error

func JsonStringify

func JsonStringify(data interface{}) ([]byte, error)

func JsonStringifyToFile

func JsonStringifyToFile(path string, data interface{}) error

func RandomPass

func RandomPass(length, numDigits, numSymbols int, noUpper, allowRepeat bool) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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