Documentation
¶
Index ¶
- Variables
- func SaveFile(raw []byte, path string) error
- type CKMS
- func (ckms *CKMS) Decrypt(path string) ([]byte, error)
- func (ckms *CKMS) DecryptRaw(cipherText []byte) ([]byte, error)
- func (ckms *CKMS) Encrypt(path string) ([]byte, error)
- func (ckms *CKMS) EncryptRaw(raw []byte) ([]byte, error)
- func (ckms *CKMS) GetSecret(secretName string) (map[string]string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrFileNotFound if path to config file incorrect ErrFileNotFound = errors.New("file not found") // ErrFileExistsNoOverwrite not allowed to overwrite existing files ErrFileExistsNoOverwrite = errors.New("cannot overrite existing file") )
Functions ¶
Types ¶
type CKMS ¶
type CKMS struct {
// contains filtered or unexported fields
}
CKMS reads the encrypted file, decrypts it and returns
func NewCKMS ¶
NewCKMS - config init with aws session from the shared credentials file ~/.aws/credentials and configuration from the shared configuration file ~/.aws/config.
func (*CKMS) DecryptRaw ¶
DecryptRaw decrypts raw bytes (base64 formatted in encryption process)
func (*CKMS) Encrypt ¶
Encrypt encrypts the file contents of the given input file and returns encrypted file contents in base64 format
func (*CKMS) EncryptRaw ¶
EncryptRaw converts raw bytes to base64 format and encrypts the base64 string. result is encrypted byte[]
Click to show internal directories.
Click to hide internal directories.