knife

package
v0.0.0-...-d2effea Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesDecrypt

func AesDecrypt(data, key []byte, coding Coding, op AesOp) ([]byte, error)

func AesEncrypt

func AesEncrypt(plain, key []byte, coding Coding, op AesOp) ([]byte, error)

func PKCS7Padding

func PKCS7Padding(data []byte, blockSize int) []byte

func PKCS7UnPadding

func PKCS7UnPadding(data []byte) []byte

func TimeIt

func TimeIt(method Method, url string, ro *grequests.RequestOptions) (milliseconds int64, resp *grequests.Response, err error)

Types

type AesOp

type AesOp string
const (
	CBC AesOp = "CBC"
	ECB AesOp = "ECB"
)

type Coding

type Coding int
const (
	HEX Coding
	BASE64
)

type Method

type Method string
var (
	POST   Method = "POST"
	GET    Method = "GET"
	PUT    Method = "PUT"
	DELETE Method = "DELETE"
	PATCH  Method = "PATCH"
)

Jump to

Keyboard shortcuts

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