sigs

package
v0.0.0-...-85922c0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(sigType crypto.SigType) ([]byte, error)

func RegisterSignature

func RegisterSignature(sigType crypto.SigType, sigShim SigShim)

func Sign

func Sign(sigType crypto.SigType, priv, msg []byte) (*crypto.Signature, error)

func ToPublic

func ToPublic(sigType crypto.SigType, priv []byte) ([]byte, error)

func Verify

func Verify(sig *crypto.Signature, pk, msg []byte) error

Types

type SigShim

type SigShim interface {
	Generate() ([]byte, error)
	Verify(signature, pubKey, data []byte) error
	ToPublic([]byte) ([]byte, error)
	Sign(priv, msg []byte) ([]byte, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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