cose

package
v0.0.0-...-de4bb62 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VCCOSEType = "application/vc+cose"
	VPCOSEType = "application/vp+cose"
)

Variables

View Source
var (
	VCCOSEContentType = "application/" + credential.VCContentType
	VPCOSEContentType = "application/" + credential.VPContentType
)

Functions

func SignVerifiableCredential

func SignVerifiableCredential(vc credential.VerifiableCredential, key jwk.Key) ([]byte, error)

SignVerifiableCredential signs a VerifiableCredential using COSE.

func SignVerifiablePresentation

func SignVerifiablePresentation(vp credential.VerifiablePresentation, key jwk.Key) ([]byte, error)

SignVerifiablePresentation signs a VerifiablePresentation using COSE.

func VerifyVerifiableCredential

func VerifyVerifiableCredential(payload []byte, key jwk.Key) (*credential.VerifiableCredential, error)

VerifyVerifiableCredential verifies a COSE-signed VerifiableCredential using the provided key.

func VerifyVerifiablePresentation

func VerifyVerifiablePresentation(payload []byte, key jwk.Key) (*credential.VerifiablePresentation, error)

VerifyVerifiablePresentation verifies a COSE-signed VerifiablePresentation using the provided key. TODO(gabe) this does not yet validate signatures of credentials in the presentation

Types

This section is empty.

Jump to

Keyboard shortcuts

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