Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Recipients ¶ added in v1.15.0
type Recipients struct {
// contains filtered or unexported fields
}
Recipients is a list of Key IDs. It will try to retain the file as much as possible while manipulating the recipients.
func Unmarshal ¶
func Unmarshal(buf []byte) *Recipients
Unmarshal Recipients line by line from a io.Reader. Handles Unix, Windows and Mac line endings.
func (*Recipients) Add ¶ added in v1.15.0
func (r *Recipients) Add(key string) bool
Add adds a new recipients. It returns true if the recipient was added.
func (*Recipients) Has ¶ added in v1.15.0
func (r *Recipients) Has(key string) bool
Has returns true if the recipient is found.
func (*Recipients) Hash ¶ added in v1.15.2
func (r *Recipients) Hash() string
Hash returns the hex encoded SHA256 sum of the recipients.
func (*Recipients) IDs ¶ added in v1.15.0
func (r *Recipients) IDs() []string
IDs returns the key IDs.
func (*Recipients) Len ¶ added in v1.15.3
func (r *Recipients) Len() int
Len returns the number of recipients.
func (*Recipients) Marshal ¶ added in v1.15.0
func (r *Recipients) Marshal() []byte
Marshal all in memory Recipients line by line to []byte.
func (*Recipients) Remove ¶ added in v1.15.0
func (r *Recipients) Remove(key string) bool
Remove deletes an existing recipient. It returns true if the recipients was present and got removed.
Click to show internal directories.
Click to hide internal directories.