proof

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2020 License: Apache-2.0 Imports: 3 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrProofNotFound = errors.New("proof not found")

ErrProofNotFound is returned when proof is not found

Functions

func AddProof

func AddProof(jsonLdObject map[string]interface{}, proof *Proof) error

AddProof adds a proof to LD Object

func CreateVerifyHash

func CreateVerifyHash(suite signatureSuite, jsonldDoc, proofOptions map[string]interface{}) ([]byte, error)

CreateVerifyHash returns data that is used to generate or verify a digital signature Algorithm steps are described here https://w3c-dvcg.github.io/ld-signatures/#create-verify-hash-algorithm

func GetCopyWithoutProof

func GetCopyWithoutProof(jsonLdObject map[string]interface{}) map[string]interface{}

GetCopyWithoutProof gets copy of JSON LD Object without proofs (signatures)

Types

type Proof

type Proof struct {
	Type       string
	Created    *time.Time
	Creator    string
	ProofValue []byte
	Domain     string
	Nonce      []byte
}

Proof is cryptographic proof of the integrity of the DID Document

func GetProofs

func GetProofs(jsonLdObject map[string]interface{}) ([]*Proof, error)

GetProofs gets proof(s) from LD Object

func NewProof

func NewProof(emap map[string]interface{}) (*Proof, error)

NewProof creates new proof

func (*Proof) JSONLdObject

func (p *Proof) JSONLdObject() map[string]interface{}

JSONLdObject returns map that represents JSON LD Object

Jump to

Keyboard shortcuts

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