crypto

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2023 License: GPL-3.0 Imports: 35 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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