goutils

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

README

go-utils

Documentation

Index

Constants

View Source
const (
	ApplicationJson   = "application/json"
	SuccessStatusCode = 200
)

Variables

This section is empty.

Functions

func AesCbcPKCS5PaddingDecrypt

func AesCbcPKCS5PaddingDecrypt(src, key, iv string) (string, error)

AesCbcPKCS5PaddingDecrypt AES CBC PKCS5Padding decrypt

func AesCbcPKCS5PaddingEncrypt

func AesCbcPKCS5PaddingEncrypt(src, key, iv string) (string, error)

AesCbcPKCS5PaddingEncrypt AES CBC PKCS5Padding encrypt

func AesEcbPKCS5PaddingDecrypt

func AesEcbPKCS5PaddingDecrypt(src, key string) (string, error)

AesEcbPKCS5PaddingDecrypt AES ECB PKCS5Padding decrypt

func AesEcbPKCS5PaddingEncrypt

func AesEcbPKCS5PaddingEncrypt(src, key string) (string, error)

AesEcbPKCS5PaddingEncrypt AES ECB PKCS5Padding encrypt

func Md5Sum

func Md5Sum(src string) string

Md5Sum md5 calc

func NewECBDecrypter

func NewECBDecrypter(b cipher.Block) cipher.BlockMode

func NewECBEncrypter

func NewECBEncrypter(b cipher.Block) cipher.BlockMode

func PKCS5Padding

func PKCS5Padding(ciphertext []byte, blockSize int) []byte

func PKCS5UnPadding

func PKCS5UnPadding(origData []byte) []byte

func PostHttpsJsonDirectRequest

func PostHttpsJsonDirectRequest(url string, body []byte) ([]byte, error)

PostHttpsJsonDirectRequest post https json body direct and return bytes

func PostHttpsJsonRequest

func PostHttpsJsonRequest(url string, params map[string]interface{}) (map[string]interface{}, error)

PostHttpsJsonRequest post https json request and return map

func Sha1Sum

func Sha1Sum(src string) string

Sha1Sum sha1 calc

func Sha256Sum

func Sha256Sum(src string) string

Sha256Sum sha256 calc

func ToJson

func ToJson(v interface{}) string

ToJson object to json string

Types

This section is empty.

Jump to

Keyboard shortcuts

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