rsa

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultClient = &http.Client{
	Transport: NewSignTransport(http.DefaultTransport),
}

DefaultClient ...

Functions

func Decrypt

func Decrypt(cipherText []byte) ([]byte, error)

RSA解密 cipherText 需要解密的byte数据

func Encrypt

func Encrypt(plainText []byte) []byte

RSA加密 plainText 要加密的数据

func LoadPrivKey

func LoadPrivKey(filename string) (err error)

LoadPrivKey ...

func LoadPubKey

func LoadPubKey(filename string) (err error)

LoadPubKey ...

func NewSignTransport

func NewSignTransport(t http.RoundTripper) http.RoundTripper

NewSignTransport ...

func VerifyHTTPRequest

func VerifyHTTPRequest(req *http.Request) (err error)

VerifyHTTPRequest ...

Types

type SignTransport

type SignTransport struct {
	// contains filtered or unexported fields
}

SignTransport ...

func (*SignTransport) RoundTrip

func (t *SignTransport) RoundTrip(req *http.Request) (resp *http.Response, err error)

RoundTrip ...

Jump to

Keyboard shortcuts

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