msp

package
v0.0.0-...-2e8d15a Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProviderTypeToString

func ProviderTypeToString(id ProviderType) string

返回一个代表签名者类型的字符串

Types

type Identity

type Identity interface {
	ExpiresAt() time.Time
	GetIdentifier() *IdentityIdentifier
	GetMSPIdentifier() string

	Validate() error
	//匿名
	Anonymous() bool

	//使用作为引用的identify来给消息进行签名
	Verify(msg []byte, sig []byte) error

	//将签名转化为字符串
	Serialize() ([]byte, error)
}

Identity 接口 定义操作包含 证书。 提供签名认证。

type IdentityIdentifier

type IdentityIdentifier struct {

	// The identifier of the associated membership service provider
	Mspid string

	// The identifier for an identity within a provider
	Id string
}

IdentityIdentifier is a holder for the identifier of a specific identity, naturally namespaced, by its provider identifier.

type ProviderType

type ProviderType int

证书提供者的类型

const (
	FABRIC ProviderType = iota // MSP is of FABRIC type
	IDEMIX                     // MSP is of IDEMIX type
	OTHER                      // MSP is of OTHER TYPE

)

type SigningIdentity

type SigningIdentity interface {

	// Extends Identity
	Identity

	// Sign the message
	Sign(msg []byte) ([]byte, error)

	// GetPublicVersion returns the public parts of this identity
	GetPublicVersion() Identity
}

Jump to

Keyboard shortcuts

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