identity

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadCertificate added in v0.0.1

func ReadCertificate(f string) (*x509.Certificate, []byte, error)

func ReadECDSAPrivateKey added in v0.0.1

func ReadECDSAPrivateKey(f string) (*ecdsa.PrivateKey, error)

Types

type Identity

type Identity interface {
	MspID() string       // ID of the Membership Service Provider to which this identity belongs.
	Credentials() []byte // Implementation-specific credentials.
}

Identity used to interact with a Fabric network.

type Signer

type Signer interface {
	Sign(message []byte) ([]byte, error)
}

Signer can sign messages using an identity's private credentials.

type SigningIdentity

type SigningIdentity interface {
	Identity
	Signer
}

SigningIdentity represents an identity that is able to sign messages.

func NewPrivateKeySigningIdentity

func NewPrivateKeySigningIdentity(mspID string, certificate *x509.Certificate, privateKey crypto.PrivateKey) (SigningIdentity, error)

Jump to

Keyboard shortcuts

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