signer

package
v0.0.0-...-9488465 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2019 License: Apache-2.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 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) 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