rsa

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2024 License: MIT Imports: 9 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)

PublicKeyToBytes 使用x509标准将公钥转换为字节

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