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

Interface Recipient

age.go:82–86  ·  view source on GitHub ↗

A Recipient is passed to [Encrypt] to wrap an opaque file key to one or more recipient stanza(s). It can be for example a public key like [HybridRecipient], a plugin, or a custom implementation.

Source from the content-addressed store, hash-verified

80// recipient stanza(s). It can be for example a public key like [HybridRecipient],
81// a plugin, or a custom implementation.
82type Recipient interface {
83 // Most age API users won't need to interact with this method directly, and
84 // should instead pass [Recipient] implementations to [Encrypt].
85 Wrap(fileKey []byte) ([]*Stanza, error)
86}
87
88// RecipientWithLabels can be optionally implemented by a [Recipient], in which
89// case [Encrypt] will use WrapWithLabels instead of [Recipient.Wrap].

Callers 26

TestX25519RoundTripFunction · 0.65
TestHybridRoundTripFunction · 0.65
wrapWithLabelsFunction · 0.65
wrapWithLabelsFunction · 0.65
WrapMethod · 0.95
TagMethod · 0.95
WrapWithLabelsMethod · 0.95
BytesMethod · 0.95
StringMethod · 0.95
TestClassicRoundTripFunction · 0.80
TestHybridRoundTripFunction · 0.80
WrapWithLabelsMethod · 0.95

Implementers 11

testRecipientage_test.go
testRecipientplugin/client_test.go
testPQCRecipientplugin/client_test.go
Recipientplugin/example_test.go
testPlugincmd/age/age_test.go
RSARecipientagessh/agessh.go
Ed25519Recipientagessh/agessh.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…