func (s *Store) SetRecipients(ctx context.Context, rs []string) error {
	return s.saveRecipients(ctx, rs, "Set Recipients")
}
SetRecipients will update the stored recipients and the associated checksum
package leaf
import (
	"context"
	"fmt"
	"path/filepath"
	"sort"
	"strings"
	"errors"
	"github.com/google/go-cmp/cmp"
	"github.com/gopasspw/gopass/internal/out"
	"github.com/gopasspw/gopass/internal/recipients"
	"github.com/gopasspw/gopass/internal/store"
	"github.com/gopasspw/gopass/pkg/ctxutil"
	"github.com/gopasspw/gopass/pkg/debug"
)
const (
	keyDir    = ".public-keys"
	oldKeyDir = ".gpg-keys"
)
func (s *Store) Recipients(ctx context.Context) []string {
	rs, err := s.GetRecipients(ctx, "")
	if err != nil {
		out.Errorf(ctx, "failed to read recipient list: %s", err)
	}
	return rs
}
func (s *Store) RecipientsTree(ctx context.Context) map[string][]string {
	idfs := s.idFiles(ctx)
	out := make(map[string][]string, len(idfs))
	root := s.Recipients(ctx)
	for _, idf := range idfs {
		if strings.HasPrefix(idf, ".") {
			continue
		}
		srs, err := s.getRecipients(ctx, idf)
		if err != nil {
			debug.Log("failed to list recipients: %s", err)
			continue
		}
		if cmp.Equal(out[""], srs) {
			debug.Log("root recipients equal secret recipients from %s", idf)
			continue
		}
		dir := filepath.Dir(idf)
		out[dir] = srs
	}
	out[""] = root
	return out
}
func (s *Store) AddRecipient(ctx context.Context, id string) error {
	rs, err := s.GetRecipients(ctx, "")
	if err != nil {
		return fmt.Errorf("failed to read recipient list: %w", err)
	}
	debug.Log("new recipient: %q - existing: %+v", id, rs)
	for _, k := range rs {
		if k == id {
			return fmt.Errorf("recipient already in store")
		}
	}
	rs = append(rs, id)
	if err := s.saveRecipients(ctx, rs, "Added Recipient "+id); err != nil {
		return fmt.Errorf("failed to save recipients: %w", err)
	}
	out.Printf(ctx, "Reencrypting existing secrets. This may take some time ...")
	return s.reencrypt(ctxutil.WithCommitMessage(ctx, "Added Recipient "+id))
}
func (s *Store) SaveRecipients(ctx context.Context) error {
	rs, err := s.GetRecipients(ctx, "")
	if err != nil {
		return fmt.Errorf("failed to get recipients: %w", err)
	}
	return s.saveRecipients(ctx, rs, "Save Recipients")
}