Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrMissingRecipients is the error returned when no recipients public keys were provided. ErrMissingRecipients = errors.New("no recipients were provided") )
Functions ¶
func EncryptLink ¶
func EncryptLink(ctx context.Context, link *chainscript.Link, recipientsKeys []*PublicKeyInfo) error
EncryptLink encrypts the link's data with the provided public keys. The link is modified in place.
func NewLink ¶
func NewLink( ctx context.Context, recipients []*PublicKeyInfo, wfID string, formData interface{}, metadata interface{}, action string, processState string, tags []string, prevSegment *chainscript.Segment, refs ...*chainscript.LinkReference) (*chainscript.Link, error)
NewLink returns a new chainscript link ready to be sent by the trace client. Note that it encrypts the form data, but does not sign the link since this is done in the client.
Types ¶
type LinkRecipient ¶
type LinkRecipient struct { PubKeyID string `json:"pubKeyId"` PubKey string `json:"pubKey"` SymmetricKey []byte `json:"symmetricKey"` }
LinkRecipient is the type a recipient should have in the link's metadata.
type PublicKeyInfo ¶
PublicKeyInfo contains the public key and its ID.
Click to show internal directories.
Click to hide internal directories.