crypt

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Crypto

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

Crypto 结构体

func NewCrypto

func NewCrypto() *Crypto

NewCrypto 实例化

func (*Crypto) MD5encode

func (*Crypto) MD5encode(s string) string

MD5encode md5加密

@param s 待加密字符串

func (*Crypto) SetPrivateKey

func (crypt *Crypto) SetPrivateKey(privateKey string) *Crypto

SetPrivateKey 设置私钥证书

func (*Crypto) SetPublicKey

func (crypt *Crypto) SetPublicKey(pubKey string) *Crypto

SetPublicKey 设置公钥证书

func (*Crypto) SignUsingSha256WithRsa

func (crypt *Crypto) SignUsingSha256WithRsa(data []byte) ([]byte, error)

SignUsingSha256WithRsa 使用sha256-rsa算法进行签名

func (*Crypto) VerifySignUsingSha256WithRsa

func (crypt *Crypto) VerifySignUsingSha256WithRsa(data, sign []byte) error

VerifySignUsingSha256WithRsa 使用sha256-rsa算法进行签名验证

Jump to

Keyboard shortcuts

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