func setEncrypted(key, keyring string, d []byte, store backend.Store) error { kr, err := os.Open(keyring) if err != nil { return err } defer kr.Close() secureValue, err := secconf.Encode(d, kr) if err != nil { return err } err = store.Set(key, secureValue) return err }
func setPlain(key string, store backend.Store, d []byte) error { err := store.Set(key, d) return err }