gsm2

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2025 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GerenateSM2Key

func GerenateSM2Key(pwd []byte) (private, public []byte, err error)
基于 "github.com/tjfoc/gmsm/gsm2" 简单的封装

GerenateSM2Key 生成公私钥

func PrivateKeyDecrypt

func PrivateKeyDecrypt(secretText []byte, privateKey []byte, pwd []byte) ([]byte, error)

PrivateKeyDecrypt 私钥解密

func PublicKeyEncrypt

func PublicKeyEncrypt(originalText []byte, publicKey []byte) ([]byte, error)

PublicKeyEncrypt 公钥加密 originalText 加密原文 publicKey 公钥 return 密文

func Sign

func Sign(originalText []byte, privateKey []byte, pwd []byte) []byte

Sign 签名 originalText 签名原文 privateKey 私钥

func Verify

func Verify(secretText, sign, publicKey []byte) bool

Verify 验签 originalText 密文 sign 摘要 publicKey 公钥

Types

This section is empty.

Jump to

Keyboard shortcuts

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