signature

package
v0.0.0-...-bcf92e7 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHashData

func GetHashData(data SignableData) []byte

func GetHashForSigning

func GetHashForSigning(data SignableData) []byte

func Sign

func Sign(data SignableData, prikey []byte) ([]byte, error)

func SignBySigner

func SignBySigner(data SignableData, signer Signer) ([]byte, error)

func VerifySignableDataContracts

func VerifySignableDataContracts(data SignableData) error

Types

type SignableData

type SignableData interface {
	interfaces.ISignableObject

	//Get the the SignableData's program hashes
	GetProgramHashes() ([]common.Uint160, error)

	SetPrograms([]*program.Program)

	GetPrograms() []*program.Program

	//TODO: add SerializeUnsigned
	SerializeUnsigned(io.Writer) error
}

SignableData describe the data need be signed.

type Signer

type Signer interface {

	//get signer's private key
	PrivKey() []byte

	//get signer's public key
	PubKey() *crypto.PubKey
}

Signer is the abstract interface of user's information(Keys) for signing data.

Jump to

Keyboard shortcuts

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