Documentation ¶
Index ¶
- func DataSignature(key *ecdsa.PrivateKey, src DataSource, opts ...SignOption) ([]byte, error)
- func SignData(key *ecdsa.PrivateKey, v DataWithSignature, opts ...SignOption) error
- func SignDataWithHandler(key *ecdsa.PrivateKey, src DataSource, handler KeySignatureHandler, ...) error
- func VerifyData(src DataWithSignature, opts ...SignOption) error
- func VerifyDataWithSource(dataSrc DataSource, sigSrc KeySignatureSource, opts ...SignOption) error
- type DataSource
- type DataWithSignature
- type KeySignatureHandler
- type KeySignatureSource
- type SignOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DataSignature ¶
func DataSignature(key *ecdsa.PrivateKey, src DataSource, opts ...SignOption) ([]byte, error)
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 VerifyDataWithSource ¶
func VerifyDataWithSource(dataSrc DataSource, sigSrc KeySignatureSource, opts ...SignOption) error
Types ¶
type DataSource ¶
type DataWithSignature ¶
type DataWithSignature interface { DataSource GetSignatureWithKey() (key, sig []byte) SetSignatureWithKey(key, sig []byte) }
type KeySignatureHandler ¶
type KeySignatureSource ¶
type KeySignatureSource func() (key, sig []byte)
type SignOption ¶
type SignOption func(*cfg)
func SignWithRFC6979 ¶
func SignWithRFC6979() SignOption
Click to show internal directories.
Click to hide internal directories.