summaryrefslogtreecommitdiff
path: root/core/io/config_file.h
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-06-28 12:06:44 +0200
committerGitHub <noreply@github.com>2019-06-28 12:06:44 +0200
commita5bd40aa48c40387ef431a08e6f6fe3aa3205a20 (patch)
tree309fd1f7987d8cbbd3b80d82a4e7c67121ea4763 /core/io/config_file.h
parent3942c939e3ed152d4cf9647411f34d1bc14cdec2 (diff)
parentfcd8faf2f44ba5b1a104949663dfcd8f856f3112 (diff)
Merge pull request #30121 from DrMoriarty/encrypted_configfile
Add encrypted files support to ConfigFile
Diffstat (limited to 'core/io/config_file.h')
-rw-r--r--core/io/config_file.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/io/config_file.h b/core/io/config_file.h
index 36e5c0ca7d..3ab6fef868 100644
--- a/core/io/config_file.h
+++ b/core/io/config_file.h
@@ -32,6 +32,7 @@
#define CONFIG_FILE_H
#include "core/ordered_hash_map.h"
+#include "core/os/file_access.h"
#include "core/reference.h"
class ConfigFile : public Reference {
@@ -42,6 +43,8 @@ class ConfigFile : public Reference {
PoolStringArray _get_sections() const;
PoolStringArray _get_section_keys(const String &p_section) const;
+ Error _internal_load(const String &p_path, FileAccess *f);
+ Error _internal_save(FileAccess *file);
protected:
static void _bind_methods();
@@ -61,6 +64,12 @@ public:
Error save(const String &p_path);
Error load(const String &p_path);
+ Error load_encrypted(const String &p_path, const Vector<uint8_t> &p_key);
+ Error load_encrypted_pass(const String &p_path, const String &p_pass);
+
+ Error save_encrypted(const String &p_path, const Vector<uint8_t> &p_key);
+ Error save_encrypted_pass(const String &p_path, const String &p_pass);
+
ConfigFile();
};