Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EncryptionService ¶
type EncryptionService struct {
// contains filtered or unexported fields
}
EncryptionService for encrypting data using KMS.
func (EncryptionService) Decrypt ¶
func (e EncryptionService) Decrypt(encKey string, encVal string) (res string, err error)
Decrypt a string using AES 256 bit encryption. The encrypted key is first decrypted by KMS. The encrypted value starts with a random IV that was generated when it was encrypted.
func (EncryptionService) Encrypt ¶
func (e EncryptionService) Encrypt(input string) (encKey string, encVal string, err error)
Encrypt a string using AES 256 bit encryption. The encryption key is generated by KMS and an encrypted copy is returned which must also be stored. The encrypted value starts with a random IV that is needed to decrypt.
type MockService ¶
type MockService struct{}
MockService for tests
func NewMockService ¶
func NewMockService() MockService
Click to show internal directories.
Click to hide internal directories.