crypto

package
v0.0.0-...-73452e5 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2020 License: GPL-2.0, Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// NonceSize is the default NonceSize
	NonceSize = 24
)

Variables

This section is empty.

Functions

func GetRandomBytes

func GetRandomBytes(len int) ([]byte, error)

GetRandomBytes returns len random looking bytes

func GetRandomNonce

func GetRandomNonce() ([]byte, error)

GetRandomNonce returns a random byte array of length NonceSize

Types

type LocalSigner

type LocalSigner interface {
	// NewSignatureHeader creates a SignatureHeader with the correct signing identity and a valid nonce
	NewSignatureHeader() (*cb.SignatureHeader, error)

	// Sign a message which should embed a signature header created by NewSignatureHeader
	Sign(message []byte) ([]byte, error)
}

LocalSigner is a temporary stub interface which will be implemented by the local MSP

Jump to

Keyboard shortcuts

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