HandleRecipient registers a function to parse recipients of the form age1name1... into [age.Recipient] values. data is the decoded Bech32 payload. If the returned Recipient implements [age.RecipientWithLabels], Plugin will use it and enforce consistency across every returned stanza in an execution.
(f func(data []byte) (age.Recipient, error))
| 80 | // It must be called before [Plugin.Main], and can be called at most once. |
| 81 | // Otherwise, it panics. |
| 82 | func (p *Plugin) HandleRecipient(f func(data []byte) (age.Recipient, error)) { |
| 83 | if p.recipient != nil { |
| 84 | panic("HandleRecipient called twice") |
| 85 | } |
| 86 | p.recipient = f |
| 87 | } |
| 88 | |
| 89 | // HandleIdentityAsRecipient registers a function to parse identities of the |
| 90 | // form AGE-PLUGIN-NAME-1... into [age.Recipient] values, for when identities |
no outgoing calls