crypto

package
v1.5.12 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: GPL-3.0 Imports: 35 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateP2pKeyPair

func CreateP2pKeyPair(
	keyFileName string,
	keyGen crypto.KeyGenerator,
	log logger.Logger,
) (crypto.PrivateKey, crypto.PublicKey, error)

CreateP2pKeyPair will create a set of key pair for p2p based on provided pem file. If the provided key is empty it will generate a new one

func NewCryptoComponentsFactory

func NewCryptoComponentsFactory(args CryptoComponentsFactoryArgs) (*cryptoComponentsFactory, error)

NewCryptoComponentsFactory returns a new crypto components factory

func NewManagedCryptoComponents

func NewManagedCryptoComponents(ccf *cryptoComponentsFactory) (*managedCryptoComponents, error)

NewManagedCryptoComponents creates a new Crypto components handler

func NewMultiSignerContainer

func NewMultiSignerContainer(args MultiSigArgs, multiSignerConfig []config.MultiSignerConfig) (*container, error)

NewMultiSignerContainer creates the multiSignerContainer container

Types

type CryptoComponentsFactoryArgs

type CryptoComponentsFactoryArgs struct {
	ValidatorKeyPemFileName              string
	SkIndex                              int
	Config                               config.Config
	EnableEpochs                         config.EnableEpochs
	CoreComponentsHolder                 factory.CoreComponentsHolder
	KeyLoader                            factory.KeyLoaderHandler
	ActivateBLSPubKeyMessageVerification bool
	IsInImportMode                       bool
	ImportModeNoSigCheck                 bool
	NoKeyProvided                        bool
	P2pKeyPemFileName                    string
}

CryptoComponentsFactoryArgs holds the arguments needed for creating crypto components

type CryptoComponentsHandlerArgs

type CryptoComponentsHandlerArgs CryptoComponentsFactoryArgs

CryptoComponentsHandlerArgs holds the arguments required to create a crypto components handler

type MultiSigArgs

type MultiSigArgs struct {
	MultiSigHasherType   string
	BlSignKeyGen         crypto.KeyGenerator
	ConsensusType        string
	ImportModeNoSigCheck bool
}

MultiSigArgs holds the arguments for creating the multiSignerContainer container

Jump to

Keyboard shortcuts

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