Documentation ¶
Index ¶
- func CreateEntity(name, email string) (*openpgp.Entity, error)
- func Decrypt(encoded string, entityList openpgp.EntityList) (string, error)
- func DisplaySyntaxError(data []byte, syntaxError error) (err error)
- func Encrypt(secret string, entityList openpgp.EntityList) (string, error)
- func GetEntityList(keys []string, passphrase string) (openpgp.EntityList, error)
- func Includes(haystack []string, needle string) bool
- func IncludesPrefix(haystack []string, needle string) bool
- func JSONPointerPath(s string) string
- func PrintPrivateKey(entity *openpgp.Entity, filename string) error
- func PrintPublicKey(entity *openpgp.Entity, filename string) error
- func ReadFile(filename string) (string, error)
- func Remove(s []string, val string) []string
- type FileStater
- type OsFS
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decrypt ¶
func Decrypt(encoded string, entityList openpgp.EntityList) (string, error)
Decrypts the base64-encoded string end decrypts with the private key.
func DisplaySyntaxError ¶
displaySyntaxError will display more information such as line and error type given an error and the data that was unmarshalled. Thanks to https://github.com/markpeek/packer/commit/5bf33a0e91b2318a40c42e9bf855dcc8dd4cdec5
func Encrypt ¶
func Encrypt(secret string, entityList openpgp.EntityList) (string, error)
Encrypts secret with all public keys and base64-encodes the result.
func GetEntityList ¶
func GetEntityList(keys []string, passphrase string) (openpgp.EntityList, error)
Assembles entity list from keys in given files
func IncludesPrefix ¶
IncludesPrefix checks if any item in haystack is a prefix of needle
func JSONPointerPath ¶
JSONPointerPath builds a JSON pointer path according to spec, see https://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-07#section-3.
Types ¶
type FileStater ¶ added in v0.13.0
FileStater is a helper interface to allow testing.