Documentation ¶
Index ¶
- func Base64(source string) string
- func Base64Decode(src string) (string, error)
- func Base64SafeDecode(source string) ([]byte, error)
- func Base64SafeEncode(source []byte) string
- func CBCDecrypt(strKey, strCiphertext string) (string, error)
- func CBCEncrypt(strKey, strPlaintext string) (string, error)
- func Checksum(data []byte) string
- func FixStrLength(s string, fixLen int) string
- func HmacSha1(src string, key string) string
- func JSON(v interface{}) string
- func JSONCompact(data interface{}) string
- func JSONCompactE(data interface{}) (string, error)
- func JSONPretty(data interface{}) string
- func JSONPrettyE(data interface{}) (string, error)
- func PKCS5Padding(ciphertext []byte, blockSize int) []byte
- func PKCS5UnPadding(origData []byte) []byte
- func Sha256(src string) (string, error)
- func Targz(srcPath string, baseDir bool, writer io.Writer) error
- func TomlToJSON(data []byte) ([]byte, error)
- func Untargz(dst string, r io.Reader) error
- func ZeroPadding(ciphertext []byte, blockSize int) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Base64Decode ¶
Base64Decode 安全解码,兼容标准和URL编码,以及后面去除等号的情况。
func Base64SafeDecode ¶
Base64SafeDecode 安全解码,兼容标准和URL编码,以及后面等号是否多余
func Base64SafeEncode ¶
Base64SafeEncode 安全URL编码,去除后面多余的等号
func CBCEncrypt ¶
CBCEncrypt encrypt original with key of either 16, 24, or 32 bytes
func JSONCompact ¶
func JSONCompact(data interface{}) string
JSONCompact compact the JSON encoding of data silently
func JSONCompactE ¶
JSONCompactE compact the JSON encoding of data
func JSONPretty ¶
func JSONPretty(data interface{}) string
JSONPretty prettify the JSON encoding of data silently
func JSONPrettyE ¶
JSONPrettyE prettify the JSON encoding of data
func Targz ¶
Targz takes a source path (srcPath) and writer and walks 'srcPath' writing each file found to the tar writer; the purpose for accepting multiple writers is to allow for multiple outputs (for example a file, or md5 hash) https://medium.com/@skdomino/taring-untaring-files-in-go-6b07cf56bc07
Types ¶
This section is empty.