fabric-sdk-go: github.com/hyperledger/fabric-sdk-go/pkg/core/config/cryptoutil Index | Files

package cryptoutil

import "github.com/hyperledger/fabric-sdk-go/pkg/core/config/cryptoutil"


Package Files


func GetPrivateKeyFromCert Uses

func GetPrivateKeyFromCert(cert []byte, cs core.CryptoSuite) (core.Key, error)

GetPrivateKeyFromCert will return private key represented by SKI in cert's public key

func GetPublicKeyFromCert Uses

func GetPublicKeyFromCert(cert []byte, cs core.CryptoSuite) (core.Key, error)

GetPublicKeyFromCert will return public key the from cert

func X509KeyPair Uses

func X509KeyPair(certPEMBlock []byte, pk core.Key, cs core.CryptoSuite) (tls.Certificate, error)

X509KeyPair will return cer/key pair used for mutual TLS

type PrivateKey Uses

type PrivateKey struct {
    // contains filtered or unexported fields

PrivateKey is signer implementation for golang client TLS

func (*PrivateKey) Public Uses

func (priv *PrivateKey) Public() crypto.PublicKey

Public returns the public key corresponding to private key

func (*PrivateKey) Sign Uses

func (priv *PrivateKey) Sign(rand io.Reader, msg []byte, opts crypto.SignerOpts) ([]byte, error)

Sign signs msg with priv, reading randomness from rand. If opts is a *PSSOptions then the PSS algorithm will be used, otherwise PKCS#1 v1.5 will be used. This method is intended to support keys where the private part is kept in, for example, a hardware module.

Package cryptoutil imports 10 packages (graph) and is imported by 2 packages. Updated 2019-12-15. Refresh now. Tools for package owners.