MCPcopy
hub / github.com/FiloSottile/age / RecipientWithLabels

Interface RecipientWithLabels

age.go:99–101  ·  view source on GitHub ↗

RecipientWithLabels can be optionally implemented by a [Recipient], in which case [Encrypt] will use WrapWithLabels instead of [Recipient.Wrap]. Encrypt will succeed only if the labels returned by all the recipients (assuming the empty set for those that don't implement RecipientWithLabels) are the

Source from the content-addressed store, hash-verified

97// to ensure a recipient is always used alone (by returning a random label, for
98// example to preserve its authentication properties).
99type RecipientWithLabels interface {
100 WrapWithLabels(fileKey []byte) (s []*Stanza, labels []string, err error)
101}
102
103// A Stanza is a section of the age header that encapsulates the file key as
104// encrypted to a specific recipient.

Callers 2

wrapWithLabelsFunction · 0.65
wrapWithLabelsFunction · 0.65

Implementers 6

testRecipientage_test.go
testPQCRecipientplugin/client_test.go
Recipientplugin/example_test.go
Recipienttag/tag.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…