gorsa

package
v1.0.14 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RSA added in v1.0.5

type RSA interface {
	GetPrivateKey() (interface{}, string)
	GetPublicKey() (interface{}, string)
	Encrypt(msg []byte) (string, error)
	Decrypt(msg string) (string, error)
	Sign(msg []byte) ([]byte, error)
	Verify(msg []byte, sign string) error
}

type RsaObj

type RsaObj struct {
	PrivateKeyBase64 string
	PublicKeyBase64  string
	// contains filtered or unexported fields
}

func (*RsaObj) CreateRsa1024

func (self *RsaObj) CreateRsa1024() error

func (*RsaObj) CreateRsa2048

func (self *RsaObj) CreateRsa2048() error

func (*RsaObj) CreateRsaFile

func (self *RsaObj) CreateRsaFile(keyfile, pemfile string) error

func (*RsaObj) CreateRsaFileBase64

func (self *RsaObj) CreateRsaFileBase64(b ...int) error

func (*RsaObj) Decrypt

func (self *RsaObj) Decrypt(msg string) (string, error)

func (*RsaObj) Encrypt

func (self *RsaObj) Encrypt(msg []byte) (string, error)

func (*RsaObj) GetPrivateKey added in v1.0.5

func (self *RsaObj) GetPrivateKey() (interface{}, string)

func (*RsaObj) GetPublicKey added in v1.0.5

func (self *RsaObj) GetPublicKey() (interface{}, string)

func (*RsaObj) LoadRsaFile

func (self *RsaObj) LoadRsaFile(filePath string) error

func (*RsaObj) LoadRsaKeyFileBase64

func (self *RsaObj) LoadRsaKeyFileBase64(fileBase64 string) error

func (*RsaObj) LoadRsaPemFileBase64

func (self *RsaObj) LoadRsaPemFileBase64(fileBase64 string) error

func (*RsaObj) LoadRsaPemFileByte

func (self *RsaObj) LoadRsaPemFileByte(fileByte []byte) error

func (*RsaObj) LoadRsaPubkey

func (self *RsaObj) LoadRsaPubkey(filePath string) error

func (*RsaObj) Sign added in v1.0.5

func (self *RsaObj) Sign(msg []byte) ([]byte, error)

func (*RsaObj) Verify added in v1.0.5

func (self *RsaObj) Verify(msg []byte, sign string) error

Jump to

Keyboard shortcuts

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