Documentation ¶
Index ¶
- func AddKeyGPG(info *infofile.InfoFile, masterKey []byte, gpgKey string) (keyId string, errMessage string, err error)
- func AddKeyPassphrase(info *infofile.InfoFile, masterKey []byte, passphrase string) (keyId string, errMessage string, err error)
- func GPGDecrypt(in []byte) (out []byte, err error)
- func GPGEncrypt(in []byte, key string) (out []byte, err error)
- func GPGUID(key string) string
- func GetMasterKeyWithGPG(info *infofile.InfoFile) (masterKey []byte, keyId string, errMessage string, err error)
- func GetMasterKeyWithPassphrase(info *infofile.InfoFile, passphrase string) (masterKey []byte, keyId string, errMessage string, err error)
- func NormalizeGPGKeyId(key string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddKeyGPG ¶
func AddKeyGPG(info *infofile.InfoFile, masterKey []byte, gpgKey string) (keyId string, errMessage string, err error)
AddKeyGPG adds a new wrapping with GPG
func AddKeyPassphrase ¶
func AddKeyPassphrase(info *infofile.InfoFile, masterKey []byte, passphrase string) (keyId string, errMessage string, err error)
AddKeyPassphrase adds a new wrapping with a passphrase
func GPGDecrypt ¶
GPGDecrypt decrypts data using the GPG binary
func GPGEncrypt ¶
GPGEncrypt encrypts data using the GPG binary
func GetMasterKeyWithGPG ¶
func GetMasterKeyWithGPG(info *infofile.InfoFile) (masterKey []byte, keyId string, errMessage string, err error)
GetMasterKeyWithGPG gets the master key unwrapping it with GPG
func GetMasterKeyWithPassphrase ¶
func GetMasterKeyWithPassphrase(info *infofile.InfoFile, passphrase string) (masterKey []byte, keyId string, errMessage string, err error)
GetMasterKeyWithPassphrase gets the master key unwrapping it with a passphrase (Supports v1 keys too, which were directly derived from the passphrase)
func NormalizeGPGKeyId ¶
NormalizeGPGKeyId normalizes a GPG key: ensures it's all uppercase, starts with 0x, and it only uses the last 64 bits
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.