Documentation
¶
Index ¶
- func CrypterFromKey(armoredKey string, loadPassphrase func() (string, bool)) crypto.Crypter
- func CrypterFromKeyPath(armoredKeyPath string, loadPassphrase func() (string, bool)) crypto.Crypter
- func CrypterFromKeyRingID(keyRingID string, loadPassphrase func() (string, bool)) crypto.Crypter
- type Crypter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CrypterFromKey ¶
CrypterFromKey creates Crypter from armored key.
func CrypterFromKeyPath ¶
CrypterFromKeyPath creates Crypter from armored key path.
Types ¶
type Crypter ¶
type Crypter struct {
KeyRingID string
IsUseKeyRingID bool
ArmoredKey string
IsUseArmoredKey bool
ArmoredKeyPath string
IsUseArmoredKeyPath bool
PubKey openpgp.EntityList
SecretKey openpgp.EntityList
// contains filtered or unexported fields
}
Crypter incapsulates specific of cypher method Includes keys, infrastructure information etc If many encryption methods will be used it worth to extract interface