asymmetric

package
v1.5.14 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CRSAKeyType = "go-peer/rsa"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IAddress added in v1.5.6

type IAddress interface {
	types.IConverter
	types.IParameter
}

type IListPubKeys added in v1.5.6

type IListPubKeys interface {
	InPubKeys(IPubKey) bool
	GetPubKeys() []IPubKey
	AddPubKey(IPubKey)
	DelPubKey(IPubKey)
}

func NewListPubKeys added in v1.5.6

func NewListPubKeys() IListPubKeys

type IPrivKey

type IPrivKey interface {
	crypto.IDecrypter
	types.IConverter
	types.IParameter

	SignBytes([]byte) []byte
	GetPubKey() IPubKey
}

func LoadRSAPrivKey

func LoadRSAPrivKey(pPrivKey interface{}) IPrivKey

func NewRSAPrivKey

func NewRSAPrivKey(pBits uint64) IPrivKey

Create private key by number of bits.

type IPubKey

type IPubKey interface {
	crypto.IEncrypter
	types.IConverter
	types.IParameter

	GetAddress() IAddress
	VerifyBytes([]byte, []byte) bool
}

func LoadRSAPubKey

func LoadRSAPubKey(pPubKey interface{}) IPubKey

Jump to

Keyboard shortcuts

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