sigutil

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2019 License: Unlicense Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BundleHash

func BundleHash(bundles []sig.Bundle) []byte

BundleHash returns a byte slice of the blake2b-512 hash of PubKeys

func BundlePubKeys

func BundlePubKeys(bundles []sig.Bundle) []byte

BundlePubKeys returns a byte slice of all pubkeys concatenated in the index order of the slice of sig.Bundles.

func Decode

func Decode(b []byte) (s []sig.Signer, err error)

Decode takes a gob encoded byte slice and returns a []sig.Signer and an error.

func Encode

func Encode(s []sig.Signer) ([]byte, error)

Encode takes a slice of sig.Signer and returns a gob encoded byte slice and an error

func EncodedBundleHash

func EncodedBundleHash(bundles []sig.Bundle) string

EncodedBundleHash returns a url-safe base64 encoded endpoint string of PubKeyHash

func NewDefaultSigners

func NewDefaultSigners() (s []sig.Signer)

NewDefaultSigners returns a slice of sig.Signer that includes an ed25519 sig

func NewExperimentalSigners

func NewExperimentalSigners() (s []sig.Signer)

NewExperimentalSigners returns a slice of sig.Signer that includes an ed25519 sig and an XMSS sig

func SignAll

func SignAll(message []byte, signers []sig.Signer) ([]sig.Bundle, error)

SignAll is a helper function for quickly signing a byteslice with a group of signers. It takes a slice of sig.Signers and the bytes for signing and returns a slice of sig.Bundles and an error

func VerifyAll

func VerifyAll(message []byte, bundles []sig.Bundle) bool

VerifyAll takes message bytes and a slice of sig.Bundles and returns a boolean value of true if all signatures verify, otherwise it returns false

Types

This section is empty.

Jump to

Keyboard shortcuts

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