crypto

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNilKeyGenerator = errors.New("nil key generator")

ErrNilKeyGenerator signals that a nil key generator was provided

View Source
var ErrNilP2PKeyConverter = errors.New("nil key converter")

ErrNilP2PKeyConverter signals that a nil key converter was provided

View Source
var ErrNilPrivateKey = errors.New("nil private key")

ErrNilPrivateKey signals that a nil private key was provided

View Source
var ErrNilPublicKey = errors.New("nil public key")

ErrNilPublicKey signals that a nil public key was provided

View Source
var ErrNilSingleSigner = errors.New("nil single signer")

ErrNilSingleSigner signals that a nil single signer was provided

Functions

func ConvertPrivateKeyToLibp2pPrivateKey

func ConvertPrivateKeyToLibp2pPrivateKey(privateKey crypto.PrivateKey) (libp2pCrypto.PrivKey, error)

ConvertPrivateKeyToLibp2pPrivateKey will convert common private key to libp2p private key

func NewIdentityGenerator

func NewIdentityGenerator(logger p2p.Logger) (*identityGenerator, error)

NewIdentityGenerator creates a new identity generator

func NewP2PKeyConverter

func NewP2PKeyConverter() *p2pKeyConverter

NewP2PKeyConverter returns a new instance of p2pKeyConverter

func NewP2PSignerWrapper

func NewP2PSignerWrapper(args ArgsP2pSignerWrapper) (*p2pSignerWrapper, error)

NewP2PSignerWrapper creates a new p2pSigner instance

Types

type ArgsP2pSignerWrapper

type ArgsP2pSignerWrapper struct {
	PrivateKey      crypto.PrivateKey
	Signer          crypto.SingleSigner
	KeyGen          crypto.KeyGenerator
	P2PKeyConverter p2p.P2PKeyConverter
}

ArgsP2pSignerWrapper defines the arguments needed to create a p2p signer wrapper

Jump to

Keyboard shortcuts

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