Documentation ¶
Index ¶
- func EncryptShares(input [][]byte, pgpKeys []string) ([]string, [][]byte, error)
- func FetchKeybasePubkeys(input []string) (map[string]string, error)
- func GetEntities(pgpKeys []string) ([]*openpgp.Entity, error)
- func GetFingerprints(pgpKeys []string, entities []*openpgp.Entity) ([]string, error)
- func ParsePGPKeys(keyfiles []string) ([]string, error)
- func ReadPGPFile(path string) (string, error)
- type PubKeyFilesFlag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncryptShares ¶
EncryptShares takes an ordered set of byte slices to encrypt and the corresponding base64-encoded public keys to encrypt them with, encrypts each byte slice with the corresponding public key.
Note: There is no corresponding test function; this functionality is thoroughly tested in the init and rekey command unit tests
func FetchKeybasePubkeys ¶
FetchKeybasePubkeys fetches public keys from Keybase given a set of usernames, which are derived from correctly formatted input entries. It doesn't use their client code due to both the API and the fact that it is considered alpha and probably best not to rely on it. The keys are returned as base64-encoded strings.
func GetEntities ¶
GetEntities takes in a string array of base64-encoded PGP keys and returns the openpgp Entities
func GetFingerprints ¶
GetFingerprints takes in a list of openpgp Entities and returns the fingerprints. If entities is nil, it will instead parse both entities and fingerprints from the pgpKeys string slice.
func ParsePGPKeys ¶
ParsePGPKeys takes a list of PGP keys and parses them either using keybase or reading them from disk and returns the "expanded" list of pgp keys in the same order.
func ReadPGPFile ¶
ReadPGPFile reads the given PGP file from disk.
Types ¶
type PubKeyFilesFlag ¶
type PubKeyFilesFlag []string
PGPPubKeyFiles implements the flag.Value interface and allows parsing and reading a list of PGP public key files.
func (*PubKeyFilesFlag) Set ¶
func (p *PubKeyFilesFlag) Set(val string) error
func (*PubKeyFilesFlag) String ¶
func (p *PubKeyFilesFlag) String() string