func (a *Age) ListIdentities(ctx context.Context) ([]string, error) {
	ids, err := a.getAllIdentities(ctx)
	if err != nil {
		return nil, err
	}
	idStr := make([]string, 0, len(ids))
	for k := range ids {
		idStr = append(idStr, k)
	}
	sort.Strings(idStr)
	return idStr, nil
}
ListIdentities lists all identities
package age
import (
	"context"
	"errors"
	"fmt"
	"os"
	"path/filepath"
	"sort"
	"strings"
	"time"
	"filippo.io/age"
	"filippo.io/age/agessh"
	"github.com/blang/semver/v4"
	"github.com/google/go-github/github"
	"github.com/gopasspw/gopass/internal/cache"
	"github.com/gopasspw/gopass/pkg/appdir"
	"github.com/gopasspw/gopass/pkg/debug"
	"github.com/gopasspw/gopass/pkg/termio"
)
const (
	Ext = "age"
	IDFile = ".age-ids"
)
type Age struct {
	binary  string
	keyring string
	ghc     *github.Client
	ghCache *cache.OnDisk
	askPass *askPass
	krCache map[string]age.Identity
}
func New() (*Age, error) {
	cDir, err := cache.NewOnDisk("age-github", 6*time.Hour)
	if err != nil {
		return nil, err
	}
	return &Age{
		binary:  "age",
		ghc:     github.NewClient(nil),
		ghCache: cDir,
		keyring: filepath.Join(appdir.UserConfig(), "age-keyring.age"),
		askPass: DefaultAskPass,
	}, nil
}
func (a *Age) Initialized(ctx context.Context) error {
	if a == nil {
		return fmt.Errorf("Age not initialized")
	}
	return nil
}
func (a *Age) Name() string {
	return "age"
}
func (a *Age) Version(ctx context.Context) semver.Version {
	return semver.Version{
		Patch: 1,
	}
}
func (a *Age) Ext() string {
	return Ext
}
func (a *Age) IDFile() string {
	return IDFile
}
func (a *Age) parseRecipients(ctx context.Context, recipients []string) ([]age.Recipient, error) {
	out := make([]age.Recipient, 0, len(recipients))
	for _, r := range recipients {
		if strings.HasPrefix(r, "age1") {
			id, err := age.ParseX25519Recipient(r)
			if err != nil {
				debug.Log("Failed to parse recipient %q as X25519: %s", r, err)
				continue
			}
			out = append(out, id)
			continue
		}
		if strings.HasPrefix(r, "ssh-") {
			id, err := agessh.ParseRecipient(r)
			if err != nil {
				debug.Log("Failed to parse recipient %q as SSH: %s", r, err)
				continue
			}
			out = append(out, id)
			continue
		}
		if strings.HasPrefix(r, "github:") {
			pks, err := a.getPublicKeysGithub(ctx, strings.TrimPrefix(r, "github:"))
			if err != nil {
				return out, err
			}
			for _, pk := range pks {
				id, err := agessh.ParseRecipient(r)
				if err != nil {
					debug.Log("Failed to parse GitHub recipient %q: %q: %s", r, pk, err)
					continue
				}
				out = append(out, id)
			}
		}
	}
	return out, nil
}