recipients

package
v1.15.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2024 License: MIT Imports: 8 Imported by: 0

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 New added in v1.15.0

func New() *Recipients

New creates a new list of Key IDs.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL