 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AESEncryptor ¶
type AESEncryptor struct {
	// contains filtered or unexported fields
}
    AESEncryptor uses AES to encrypt or decrypt string
type Encryptor ¶
type Encryptor interface {
	// Encrypt encrypts plaintext
	Encrypt(string) (string, error)
	// Decrypt decrypts ciphertext
	Decrypt(string) (string, error)
}
    Encryptor encrypts or decrypts a strings
func NewAESEncryptor ¶
func NewAESEncryptor(keyProvider KeyProvider) Encryptor
NewAESEncryptor returns an instance of an AESEncryptor
type FileKeyProvider ¶
type FileKeyProvider struct {
	// contains filtered or unexported fields
}
    FileKeyProvider reads key from file
type KeyProvider ¶
type KeyProvider interface {
	// Get returns the key
	// params can be used to pass parameters in different implements
	Get(params map[string]interface{}) (string, error)
}
    KeyProvider provides the key used to encrypt and decrypt attrs
func NewFileKeyProvider ¶
func NewFileKeyProvider(path string) KeyProvider
NewFileKeyProvider returns an instance of FileKeyProvider path: where the key should be read from
 Click to show internal directories. 
   Click to hide internal directories.