Documentation ¶
Index ¶
- Constants
- Variables
- func Decrypt(input string, password string) (string, error)
- func DecryptFile(path string, password string) (string, error)
- func Encrypt(input string, password string, pad int) (string, error)
- func EncryptFile(path string, input string, password string) error
- func MaybeEncrypted(input string) bool
Constants ¶
View Source
const (
DefaultFileMode = 0666
)
View Source
const VaultHeader = "$ANSIBLE_VAULT;1.1;AES256"
Variables ¶
View Source
var ( // ErrEmptyPassword is returned when password is empty ErrEmptyPassword = errors.New("password is blank") // ErrInvalidFormat is returned when secret content is not valid ErrInvalidFormat = errors.New("invalid secret format") // ErrInvalidPadding is returned when invalid key is used ErrInvalidPadding = errors.New("invalid padding") )
Functions ¶
func DecryptFile ¶
DecryptFile decrypts the content of the file with the vault password
func EncryptFile ¶
EncryptFile encrypts the input string and saves it into the file
func MaybeEncrypted ¶
Return true if the input maybe encrypted as an ansible vault
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.