txcrypto

package
v1.24.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2022 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cryptor

type Cryptor interface {
	// encrypt can encrypt the content in IBTP
	Encrypt(content []byte, address string) ([]byte, error)

	// decrypt can decrypt the content in IBTP
	Decrypt(content []byte, address string) ([]byte, error)
}

func NewDirectCryptor

func NewDirectCryptor(peerMgr peermgr.PeerManager, privKey crypto.PrivateKey, logger logrus.FieldLogger) (Cryptor, error)

func NewRelayCryptor

func NewRelayCryptor(client rpcx.Client, privKey crypto.PrivateKey, logger logrus.FieldLogger) (Cryptor, error)

type DirectCryptor

type DirectCryptor struct {
	// contains filtered or unexported fields
}

func (*DirectCryptor) Decrypt

func (d *DirectCryptor) Decrypt(content []byte, address string) ([]byte, error)

func (*DirectCryptor) Encrypt

func (d *DirectCryptor) Encrypt(content []byte, address string) ([]byte, error)

type RelayCryptor

type RelayCryptor struct {
	// contains filtered or unexported fields
}

func (*RelayCryptor) Decrypt

func (c *RelayCryptor) Decrypt(content []byte, address string) ([]byte, error)

func (*RelayCryptor) Encrypt

func (c *RelayCryptor) Encrypt(content []byte, address string) ([]byte, error)

Directories

Path Synopsis
Package mock_txcrypto is a generated GoMock package.
Package mock_txcrypto is a generated GoMock package.

Jump to

Keyboard shortcuts

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