cryptkeeper

package module
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: CC0-1.0 Imports: 11 Imported by: 0

README

cryptkeeper

Easy configuration encryption/decryption

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfig

func LoadConfig(encryptedConfigFile, environmentVar string) (map[string]interface{}, error)

LoadConfig decrypts the given encrypted configuration file, loads the configuration, and then re-encrypts the file. It requires the encrypted config file name that ends with .crypt and the environment variable where the passkey is stored.

Types

type ConfigFile

type ConfigFile struct {
	FilePath       string
	EnvironmentVar string
}

func NewConfigFile

func NewConfigFile(filePath string, environmentVar string) *ConfigFile

func (*ConfigFile) Crypter

func (c *ConfigFile) Crypter()

Repurposed crypter function

func (*ConfigFile) ProcessFile

func (c *ConfigFile) ProcessFile() error

Jump to

Keyboard shortcuts

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