signutil

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SignModel

func SignModel(model interface{}, signer Signer) (string, error)

SignModel signs model.

func SignPayload

func SignPayload(payload []byte, signer Signer) (string, error)

SignPayload allows for singing payload.

Types

type Signer

type Signer interface {
	// Sign signs data and returns signature value.
	Sign(data []byte) ([]byte, error)

	// Headers provides required JWS protected headers. It provides information about signing key and algorithm.
	Headers() jws.Headers
}

Signer defines JWS Signer interface that will be used to sign required data in Sidetree request.

Jump to

Keyboard shortcuts

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