Documentation
¶
Index ¶
- func DecodeJSONFromReader(r io.Reader, out interface{}) error
- func EncryptShares(input [][]byte, pgpKeys []string) ([]string, [][]byte, error)
- func EncryptValue(encryptionKey, value, description string) (string, string, 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 RetrieveGPGKey(pgpKey string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeJSONFromReader ¶
Decodes/Unmarshals the given io.Reader pointing to a JSON, into a desired object
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 EncryptValue ¶
EncryptValue encrypts the given value with the given encryption key. Description should be set such that errors return a meaningful user-facing response.
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 RetrieveGPGKey ¶
RetrieveGPGKey returns the PGP key specified as the pgpKey parameter, or queries the public key from the keybase service if the parameter is a keybase username prefixed with the phrase "keybase:"
Types ¶
This section is empty.