Documentation
¶
Index ¶
- type CredentialEncryptor
- func (ce *CredentialEncryptor) Decrypt(encryptedBase64 string) (string, error)
- func (ce *CredentialEncryptor) DecryptCredentials(encryptedAccessKey, encryptedSecretKey string) (accessKey, secretKey string, err error)
- func (ce *CredentialEncryptor) Encrypt(plaintext string) (string, error)
- func (ce *CredentialEncryptor) EncryptCredentials(accessKey, secretKey string) (encryptedAccessKey, encryptedSecretKey string, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CredentialEncryptor ¶
type CredentialEncryptor struct {
// contains filtered or unexported fields
}
CredentialEncryptor handles encryption and decryption of S3 credentials
func NewCredentialEncryptor ¶
func NewCredentialEncryptor(base64Key string) (*CredentialEncryptor, error)
NewCredentialEncryptor creates a new encryptor from a base64-encoded key
func (*CredentialEncryptor) Decrypt ¶
func (ce *CredentialEncryptor) Decrypt(encryptedBase64 string) (string, error)
Decrypt decrypts a credential string using AES-256-GCM
func (*CredentialEncryptor) DecryptCredentials ¶
func (ce *CredentialEncryptor) DecryptCredentials(encryptedAccessKey, encryptedSecretKey string) (accessKey, secretKey string, err error)
DecryptCredentials decrypts both access key and secret key
func (*CredentialEncryptor) Encrypt ¶
func (ce *CredentialEncryptor) Encrypt(plaintext string) (string, error)
Encrypt encrypts a credential string using AES-256-GCM
func (*CredentialEncryptor) EncryptCredentials ¶
func (ce *CredentialEncryptor) EncryptCredentials(accessKey, secretKey string) (encryptedAccessKey, encryptedSecretKey string, err error)
EncryptCredentials encrypts both access key and secret key
Click to show internal directories.
Click to hide internal directories.