Documentation ¶
Index ¶
- func Decrypt(passStr string, decryption map[string]interface{}) (string, error)
- func Encrypt(input string, encryption map[string]interface{}) (string, error)
- func LoadSecretFromSecretStore(mod *helperkv.Modifier) (map[string]interface{}, error)
- func MakeNewEncryption() (string, string, error)
- func NewOptionsBuilder(opts ...Option)
- type Option
- type OptionsBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decrypt ¶ added in v1.5.1
Decrypt is a function that accepts a base64 encoded encrypted string and a decryption map. The map should contain the base64 encoded attributes: "salt" and "initial_value". These attributes are used to decrypt the input string. The function returns the decrypted string.
func Encrypt ¶ added in v1.5.1
Encrypt is a function accepts and input string to be encoded and an encryption map. The map should contain the base64 encoded attributes: "salt" and "initial_value". These attributes are used to encrypt the input string. The function returns the base64 encoded encrypted string.
func LoadSecretFromSecretStore ¶ added in v1.5.1
LoadSecretFromSecretStore is a function that loads a secret from the secret store. It returns a map with the secret contained in the attribute named "encryptionSecret".
func MakeNewEncryption ¶ added in v1.5.1
MakeNewEncryption is a function that returns a new encryption key and a new encryption salt
func NewOptionsBuilder ¶
func NewOptionsBuilder(opts ...Option)
Types ¶
type OptionsBuilder ¶
type OptionsBuilder struct { LoadSecretFromSecretStore func(mod *helperkv.Modifier) (map[string]interface{}, error) MakeNewEncryption func() (string, string, error) Encrypt func(input string, encryption map[string]interface{}) (string, error) Decrypt func(passStr string, decryption map[string]interface{}) (string, error) }
var BuildOptions *OptionsBuilder