utils

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

加密工具类,用了3des和base64

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesBase64Decrypt

func AesBase64Decrypt(origData string, key []byte) string

func AesBase64Encrypt

func AesBase64Encrypt(origData string, key []byte) string

func AesDecrypt

func AesDecrypt(decodeStr string, key []byte) ([]byte, error)

func AesEncrypt

func AesEncrypt(encodeStr string, key []byte) (string, error)

func DesBase64Decrypt

func DesBase64Decrypt(crypted []byte) []byte

func DesBase64Encrypt

func DesBase64Encrypt(origData []byte) []byte

des3 + base64 encrypt

func GoDownload

func GoDownload(strs []string)

func Grep

func Grep(url, rule string) (strs [][]string)

func PKCS5Padding

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

func PKCS5UnPadding

func PKCS5UnPadding(origData []byte) []byte

func ReUploading

func ReUploading(key, url string) (res []string)

覆盖上传

func RefreshDirsOrUrls

func RefreshDirsOrUrls(isUrl bool, urls ...string) (result cdn.RefreshResp, err error)

刷新

func SpyContent

func SpyContent()

func TripleDesDecrypt

func TripleDesDecrypt(crypted, key []byte) ([]byte, error)

3DES解密

func TripleDesEncrypt

func TripleDesEncrypt(origData, key []byte) ([]byte, error)

3DES加密

func Uploading

func Uploading(key, url string) (res string)

简单上传

func ZeroPadding

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

func ZeroUnPadding

func ZeroUnPadding(origData []byte) []byte

Types

type PutRet

type PutRet struct {
	Hash string `json:"hash"`
	Key  string `json:"key"`
}

构造返回值字段

Jump to

Keyboard shortcuts

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