rsa

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Rsa

type Rsa struct {
	PrivateKey []byte `json:"private_key"`
	PublicKey  []byte `json:"public_key"`
}

func Gen

func Gen() (*Rsa, error)

func (*Rsa) Decrypt

func (r *Rsa) Decrypt(s string) (string, error)

Decrypt private key decrypt

func (*Rsa) Encrypt

func (r *Rsa) Encrypt(s string) (string, error)

Encrypt public key encrypt

func (*Rsa) Signature

func (r *Rsa) Signature(decrypted []byte) ([]byte, error)

Signature private key signature

func (*Rsa) SignatureVerify

func (r *Rsa) SignatureVerify(encrypted []byte, signature []byte) error

SignatureVerify public key verify

Jump to

Keyboard shortcuts

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