...

Package signer

import "github.com/hyperledger/fabric/cmd/common/signer"
Overview
Index

Overview ▾

type Config

Config holds the configuration for creation of a Signer

type Config struct {
    MSPID        string
    IdentityPath string
    KeyPath      string
}

type ECDSASignature

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

type Signer

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.

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

func NewSigner

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

NewSigner creates a new Signer out of the given configuration

func (*Signer) NewSignatureHeader

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

func (*Signer) Sign

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