util

package
v0.0.0-...-f5d5c59 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: ISC Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DigestFile

func DigestFile(filename string) (string, error)

DigestFile returns the SHA256 of a file.

func GenCertPair

func GenCertPair(org, certFile, keyFile string) error

GenCertPair generates a key/cert pair to the paths provided.

func RespondWithCopy

func RespondWithCopy(w http.ResponseWriter, code int, contentType string, body []byte) error

func RespondWithError

func RespondWithError(w http.ResponseWriter, code int, message string)

func RespondWithJSON

func RespondWithJSON(w http.ResponseWriter, code int, payload interface{})

func VerifyAnchor

func VerifyAnchor(url, tx string, mr []byte) error

VerifyAnchor verifies proof of existence of the supplied merkle root on the blockchain.

Types

This section is empty.

Jump to

Keyboard shortcuts

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