summaryrefslogtreecommitdiffstats
path: root/core/crypto
diff options
context:
space:
mode:
Diffstat (limited to 'core/crypto')
-rw-r--r--core/crypto/crypto.cpp24
-rw-r--r--core/crypto/crypto.h16
2 files changed, 20 insertions, 20 deletions
diff --git a/core/crypto/crypto.cpp b/core/crypto/crypto.cpp
index d3d0079410..62bacadf91 100644
--- a/core/crypto/crypto.cpp
+++ b/core/crypto/crypto.cpp
@@ -36,10 +36,10 @@
/// Resources
-CryptoKey *(*CryptoKey::_create)() = nullptr;
-CryptoKey *CryptoKey::create() {
+CryptoKey *(*CryptoKey::_create)(bool p_notify_postinitialize) = nullptr;
+CryptoKey *CryptoKey::create(bool p_notify_postinitialize) {
if (_create) {
- return _create();
+ return _create(p_notify_postinitialize);
}
return nullptr;
}
@@ -52,10 +52,10 @@ void CryptoKey::_bind_methods() {
ClassDB::bind_method(D_METHOD("load_from_string", "string_key", "public_only"), &CryptoKey::load_from_string, DEFVAL(false));
}
-X509Certificate *(*X509Certificate::_create)() = nullptr;
-X509Certificate *X509Certificate::create() {
+X509Certificate *(*X509Certificate::_create)(bool p_notify_postinitialize) = nullptr;
+X509Certificate *X509Certificate::create(bool p_notify_postinitialize) {
if (_create) {
- return _create();
+ return _create(p_notify_postinitialize);
}
return nullptr;
}
@@ -116,10 +116,10 @@ void HMACContext::_bind_methods() {
ClassDB::bind_method(D_METHOD("finish"), &HMACContext::finish);
}
-HMACContext *(*HMACContext::_create)() = nullptr;
-HMACContext *HMACContext::create() {
+HMACContext *(*HMACContext::_create)(bool p_notify_postinitialize) = nullptr;
+HMACContext *HMACContext::create(bool p_notify_postinitialize) {
if (_create) {
- return _create();
+ return _create(p_notify_postinitialize);
}
ERR_FAIL_V_MSG(nullptr, "HMACContext is not available when the mbedtls module is disabled.");
}
@@ -127,10 +127,10 @@ HMACContext *HMACContext::create() {
/// Crypto
void (*Crypto::_load_default_certificates)(const String &p_path) = nullptr;
-Crypto *(*Crypto::_create)() = nullptr;
-Crypto *Crypto::create() {
+Crypto *(*Crypto::_create)(bool p_notify_postinitialize) = nullptr;
+Crypto *Crypto::create(bool p_notify_postinitialize) {
if (_create) {
- return _create();
+ return _create(p_notify_postinitialize);
}
ERR_FAIL_V_MSG(nullptr, "Crypto is not available when the mbedtls module is disabled.");
}
diff --git a/core/crypto/crypto.h b/core/crypto/crypto.h
index 16649422cf..c19e6b6773 100644
--- a/core/crypto/crypto.h
+++ b/core/crypto/crypto.h
@@ -42,10 +42,10 @@ class CryptoKey : public Resource {
protected:
static void _bind_methods();
- static CryptoKey *(*_create)();
+ static CryptoKey *(*_create)(bool p_notify_postinitialize);
public:
- static CryptoKey *create();
+ static CryptoKey *create(bool p_notify_postinitialize = true);
virtual Error load(const String &p_path, bool p_public_only = false) = 0;
virtual Error save(const String &p_path, bool p_public_only = false) = 0;
virtual String save_to_string(bool p_public_only = false) = 0;
@@ -58,10 +58,10 @@ class X509Certificate : public Resource {
protected:
static void _bind_methods();
- static X509Certificate *(*_create)();
+ static X509Certificate *(*_create)(bool p_notify_postinitialize);
public:
- static X509Certificate *create();
+ static X509Certificate *create(bool p_notify_postinitialize = true);
virtual Error load(const String &p_path) = 0;
virtual Error load_from_memory(const uint8_t *p_buffer, int p_len) = 0;
virtual Error save(const String &p_path) = 0;
@@ -106,10 +106,10 @@ class HMACContext : public RefCounted {
protected:
static void _bind_methods();
- static HMACContext *(*_create)();
+ static HMACContext *(*_create)(bool p_notify_postinitialize);
public:
- static HMACContext *create();
+ static HMACContext *create(bool p_notify_postinitialize = true);
virtual Error start(HashingContext::HashType p_hash_type, const PackedByteArray &p_key) = 0;
virtual Error update(const PackedByteArray &p_data) = 0;
@@ -124,11 +124,11 @@ class Crypto : public RefCounted {
protected:
static void _bind_methods();
- static Crypto *(*_create)();
+ static Crypto *(*_create)(bool p_notify_postinitialize);
static void (*_load_default_certificates)(const String &p_path);
public:
- static Crypto *create();
+ static Crypto *create(bool p_notify_postinitialize = true);
static void load_default_certificates(const String &p_path);
virtual PackedByteArray generate_random_bytes(int p_bytes) = 0;