sra

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenRsaKey

func GenRsaKey(bits int) (prvkey, pubkey []byte, err error)

RSA公钥私钥产生

func RsaDecrypt

func RsaDecrypt(ciphertext, keyBytes []byte) ([]byte, error)

私钥解密

func RsaEncrypt

func RsaEncrypt(data, keyBytes []byte) ([]byte, error)

公钥加密

func RsaSignWithSha256

func RsaSignWithSha256(data []byte, keyBytes []byte) (sgin []byte, err error)

签名

func RsaVerySignWithSha256

func RsaVerySignWithSha256(data, signData, keyBytes []byte) (issucc bool, err error)

验证

Types

This section is empty.

Jump to

Keyboard shortcuts

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