gpgencyption

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GPGDecryption

func GPGDecryption(encryptedData string, vaultPath string) (string, error)

GPGDecryption decrypts GPG-encrypted data

func GPGDecryptionWithPassphrase

func GPGDecryptionWithPassphrase(encryptedData string, vaultPath string, passphrase string) (string, error)

GPGDecryptionWithPassphrase decrypts GPG-encrypted data using a passphrase

func GPGEncryption

func GPGEncryption(data string, vaultConfig config.VaultConfig) (string, error)

GPGEncryption encrypts data using GPG with the configured recipient

func GPGEncryptionWithPassphrase

func GPGEncryptionWithPassphrase(data string, vaultConfig config.VaultConfig, passphrase string) (string, error)

GPGEncryptionWithPassphrase encrypts data using GPG with passphrase support

func GetGPGKeyFingerprint

func GetGPGKeyFingerprint(keyID string) (string, error)

GetGPGKeyFingerprint retrieves the fingerprint for a given key ID

func IsGPGAvailable

func IsGPGAvailable() bool

IsGPGAvailable checks if GPG is installed and available

func PromptGPGOptions

func PromptGPGOptions(configuration *config.VaultConfig) error

func ValidateGPGKey

func ValidateGPGKey(keyID string) error

ValidateGPGKey validates that a GPG key exists and can be used for encryption

Types

type GPGKeyInfo

type GPGKeyInfo struct {
	KeyID       string
	Fingerprint string
	UserID      string
	Email       string
	KeyType     string
	Expired     bool
}

GPGKeyInfo represents information about a GPG key

func ListGPGKeys

func ListGPGKeys() ([]*GPGKeyInfo, error)

ListGPGKeys retrieves available GPG keys from the keyring

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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