keys

package
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2020 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

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

func GPGDecrypt(in []byte) (out []byte, err error)

GPGDecrypt decrypts data using the GPG binary

func GPGEncrypt

func GPGEncrypt(in []byte, key string) (out []byte, err error)

GPGEncrypt encrypts data using the GPG binary

func GPGUID

func GPGUID(key string) string

GPGUID returns the UID of a GPG key (as long as it's present in the keychain)

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

func NormalizeGPGKeyId(key string) string

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL