signer

package
v1.4.6 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2020 License: Apache-2.0 Imports: 14 Imported by: 620

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	MSPID        string
	IdentityPath string
	KeyPath      string
}

Config holds the configuration for creation of a Signer

type ECDSASignature

type ECDSASignature struct {
	R, S *big.Int
}

type Signer

type Signer struct {
	Creator []byte
	// contains filtered or unexported fields
}

Signer signs messages. TODO: Ideally we'd use an MSP to be agnostic, but since it's impossible to initialize an MSP without a CA cert that signs the signing identity, this will do for now.

func NewSigner

func NewSigner(conf Config) (*Signer, error)

NewSigner creates a new Signer out of the given configuration

func (*Signer) NewSignatureHeader added in v1.4.3

func (si *Signer) NewSignatureHeader() (*common.SignatureHeader, error)

func (*Signer) Sign

func (si *Signer) Sign(msg []byte) ([]byte, error)

Jump to

Keyboard shortcuts

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