Documentation
¶
Index ¶
- func AesDecryption(encryptedData string, vaultPath string) (string, error)
- func AesDecryptionWithPassphrase(encryptedData string, vaultPath string, passphrase string) (string, error)
- func AesEncryptWithPassphrase(data string, vaultConfig config.VaultConfig, passphrase string) (string, error)
- func AesEncryption(data string, vaultConfig config.VaultConfig) (string, error)
- func DecryptData(encryptedData string, vaultPath string) (string, error)
- func DecryptDataWithPassphrase(encryptedData string, vaultPath string, passphrase string) (string, error)
- func EncryptData(data string, vaultConfig config.VaultConfig) (string, error)
- func EncryptDataWithPassphrase(data string, vaultConfig config.VaultConfig, passphrase string) (string, error)
- func GPGDecryption(encryptedData string, vaultPath string) (string, error)
- func GPGDecryptionWithPassphrase(encryptedData string, vaultPath string, passphrase string) (string, error)
- func GPGEncryptWithPassphrase(data string, vaultConfig config.VaultConfig, passphrase string) (string, error)
- func GPGEncryption(data string, vaultConfig config.VaultConfig) (string, error)
- func GenerateGPGKeyConfig(vaultConfig *config.VaultConfig, selectedKey *gpgencyption.GPGKeyInfo) (*config.KeyConfig, error)
- func GetEncryptionDetails(vaultConfig config.VaultConfig) (string, error)
- func IsGPGAvailable() bool
- func ListAvailableGPGKeys() ([]*gpgencyption.GPGKeyInfo, error)
- func PromptSecurityConfig(configuration *config.VaultConfig) error
- func SetupGPGEncryption(vaultConfig *config.VaultConfig, keyConfig *config.KeyConfig) error
- func ValidateEncryptionConfiguration(vaultConfig config.VaultConfig) error
- func ValidateGPGConfiguration(vaultConfig config.VaultConfig) error
- type GPGKeyDetails
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AesDecryptionWithPassphrase ¶
func AesDecryptionWithPassphrase(encryptedData string, vaultPath string, passphrase string) (string, error)
AesDecryptionWithPassphrase decrypts data using the vault's encryption key The passphrase is used to decrypt the encryption key if the vault is passphrase protected
func AesEncryptWithPassphrase ¶
func AesEncryptWithPassphrase(data string, vaultConfig config.VaultConfig, passphrase string) (string, error)
AesEncryptWithPassphrase encrypts data using the vault's encryption key The passphrase is used to decrypt the encryption key if the vault is passphrase protected
func AesEncryption ¶
func AesEncryption(data string, vaultConfig config.VaultConfig) (string, error)
func DecryptData ¶
DecryptData decrypts data using the configured encryption method
func DecryptDataWithPassphrase ¶
func DecryptDataWithPassphrase(encryptedData string, vaultPath string, passphrase string) (string, error)
DecryptDataWithPassphrase decrypts data using the configured encryption method with passphrase
func EncryptData ¶
func EncryptData(data string, vaultConfig config.VaultConfig) (string, error)
EncryptData encrypts data using the configured encryption method
func EncryptDataWithPassphrase ¶
func EncryptDataWithPassphrase(data string, vaultConfig config.VaultConfig, passphrase string) (string, error)
EncryptDataWithPassphrase encrypts data using the configured encryption method with passphrase
func GPGDecryption ¶
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 GPGEncryptWithPassphrase ¶
func GPGEncryptWithPassphrase(data string, vaultConfig config.VaultConfig, passphrase string) (string, error)
GPGEncryptWithPassphrase encrypts data using GPG with passphrase support
func GPGEncryption ¶
func GPGEncryption(data string, vaultConfig config.VaultConfig) (string, error)
GPGEncryption encrypts data using GPG with the configured recipient
func GenerateGPGKeyConfig ¶
func GenerateGPGKeyConfig(vaultConfig *config.VaultConfig, selectedKey *gpgencyption.GPGKeyInfo) (*config.KeyConfig, error)
GenerateGPGKeyConfig creates a GPG key configuration for vault initialization
func GetEncryptionDetails ¶
func GetEncryptionDetails(vaultConfig config.VaultConfig) (string, error)
GetEncryptionDetails returns human-readable encryption details
func IsGPGAvailable ¶
func IsGPGAvailable() bool
IsGPGAvailable checks if GPG is available on the system
func ListAvailableGPGKeys ¶
func ListAvailableGPGKeys() ([]*gpgencyption.GPGKeyInfo, error)
ListAvailableGPGKeys returns a list of available GPG keys
func PromptSecurityConfig ¶
func PromptSecurityConfig(configuration *config.VaultConfig) error
PromptSecurityConfig asks for security-related configuration
func SetupGPGEncryption ¶
func SetupGPGEncryption(vaultConfig *config.VaultConfig, keyConfig *config.KeyConfig) error
SetupGPGEncryption configures GPG encryption for a vault
func ValidateEncryptionConfiguration ¶
func ValidateEncryptionConfiguration(vaultConfig config.VaultConfig) error
ValidateEncryptionConfiguration validates the encryption configuration
func ValidateGPGConfiguration ¶
func ValidateGPGConfiguration(vaultConfig config.VaultConfig) error
ValidateGPGConfiguration validates the GPG configuration
Types ¶
type GPGKeyDetails ¶
GPGKeyDetails contains detailed information about a GPG key
func GetGPGKeyInfo ¶
func GetGPGKeyInfo(vaultConfig config.VaultConfig) (*GPGKeyDetails, error)
GetGPGKeyInfo retrieves detailed information about the configured GPG key
func (*GPGKeyDetails) String ¶
func (g *GPGKeyDetails) String() string
String returns a human-readable representation of the GPG key details