HandleRecipientEncoding is like [Plugin.HandleRecipient] but provides the full recipient encoding string to the callback. It allows using functions like ParseRecipient directly.
(f func(recipient string) (age.Recipient, error))
| 121 | // |
| 122 | // It allows using functions like ParseRecipient directly. |
| 123 | func (p *Plugin) HandleRecipientEncoding(f func(recipient string) (age.Recipient, error)) { |
| 124 | p.HandleRecipient(func(data []byte) (age.Recipient, error) { |
| 125 | return f(EncodeRecipient(p.name, data)) |
| 126 | }) |
| 127 | } |
| 128 | |
| 129 | // HandleIdentityEncodingAsRecipient is like [Plugin.HandleIdentityAsRecipient] but |
| 130 | // provides the full identity encoding string to the callback. |
no test coverage detected