signature

package
v0.0.0-...-0352b5b Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SignData

func SignData(key *ecdsa.PrivateKey, v DataWithSignature, opts ...SignOption) error

func SignDataWithHandler

func SignDataWithHandler(key *ecdsa.PrivateKey, src DataSource, handler KeySignatureHandler, opts ...SignOption) error

func VerifyData

func VerifyData(src DataWithSignature, opts ...SignOption) error

func VerifyDataSlice

func VerifyDataSlice(data []byte, sigSrc KeySignatureSource, opts ...SignOption) error

func VerifyDataWithSource

func VerifyDataWithSource(dataSrc DataSource, sigSrc KeySignatureSource, opts ...SignOption) error

Types

type DataSource

type DataSource interface {
	ReadSignedData([]byte) ([]byte, error)
	SignedDataSize() int
}

type DataWithSignature

type DataWithSignature interface {
	DataSource
	GetSignature() *refs.Signature
	SetSignature(*refs.Signature)
}

type KeySignatureHandler

type KeySignatureHandler func(*refs.Signature)

type KeySignatureSource

type KeySignatureSource func() *refs.Signature

type SignOption

type SignOption func(*cfg)

func SignWithRFC6979

func SignWithRFC6979() SignOption

func SignWithWalletConnect

func SignWithWalletConnect() SignOption

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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