vm

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractPublicKey

func ExtractPublicKey(method map[string]any) (anp.PublicKeyMaterial, error)

ExtractPublicKey extracts public key material from a DID verification method.

Types

type Error

type Error struct {
	Message string
}

Error reports verification method parsing issues.

func (*Error) Error

func (e *Error) Error() string

Error implements error.

type VerificationMethod

type VerificationMethod struct {
	ID         string
	MethodType string
	PublicKey  anp.PublicKeyMaterial
}

VerificationMethod wraps parsed key material for signature helpers.

func CreateVerificationMethod

func CreateVerificationMethod(method map[string]any) (VerificationMethod, error)

CreateVerificationMethod parses a DID verification method.

func (VerificationMethod) EncodeSignature

func (v VerificationMethod) EncodeSignature(signatureBytes []byte) (string, error)

EncodeSignature encodes signature bytes using base64url.

func (VerificationMethod) VerifySignature

func (v VerificationMethod) VerifySignature(content []byte, signature string) error

VerifySignature verifies a base64url encoded signature.

Jump to

Keyboard shortcuts

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