rsa

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 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 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 RSA_Decrypt

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

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

func RSA_Encrypt

func RSA_Encrypt(plainText []byte) []byte

RSA加密 plainText 要加密的数据

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