rsa

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenKeyPair

func GenKeyPair() (PrivateKey, PublicKey, error)

GenKeyPair generate private, public key - PrivateKey private key - PublicKey public key

func VerifySignatureByPubKey

func VerifySignatureByPubKey(pub PublicKey, sig Signature, data []byte) error

VerifySignatureByPubKey verify signature by public key @pub public key @sig signature @data content data

Types

type PrivateKey

type PrivateKey string

PrivateKey string

type PublicKey

type PublicKey string

PublicKey string

type Signature

type Signature string

Signature string

func GenSignatureByPriKey

func GenSignatureByPriKey(prvKey PrivateKey, data []byte) (Signature, error)

GenSignatureByPriKey gen signature by private key @prvKey private key @data content data

- Signature signature value

Jump to

Keyboard shortcuts

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