rsa

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateKeysFromSeed

func GenerateKeysFromSeed(seedData []byte, bits int) (*rsa.PrivateKey, *rsa.PublicKey, error)

GenerateKeysFromSeed 使用种子数据生成 RSA 密钥对

func PublicKeyToBytes

func PublicKeyToBytes(pubKey *rsa.PublicKey) ([]byte, error)

func SignData

func SignData(privateKey *rsa.PrivateKey, data []byte) ([]byte, error)

使用RSA私钥为数据签名

func VerifySignature

func VerifySignature(publicKey *rsa.PublicKey, data []byte, signature []byte) bool

使用RSA公钥验证数据的签名

Types

This section is empty.

Jump to

Keyboard shortcuts

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