HandleIdentity registers a function to parse identities of the form AGE-PLUGIN-NAME-1... into [age.Identity] values. data is the decoded Bech32 payload. It must be called before [Plugin.Main], and can be called at most once. Otherwise, it panics.
(f func(data []byte) (age.Identity, error))
| 110 | // It must be called before [Plugin.Main], and can be called at most once. |
| 111 | // Otherwise, it panics. |
| 112 | func (p *Plugin) HandleIdentity(f func(data []byte) (age.Identity, error)) { |
| 113 | if p.identity != nil { |
| 114 | panic("HandleIdentity called twice") |
| 115 | } |
| 116 | p.identity = f |
| 117 | } |
| 118 | |
| 119 | // HandleRecipientEncoding is like [Plugin.HandleRecipient] but provides the |
| 120 | // full recipient encoding string to the callback. |
no outgoing calls