diff options
author | Rafał Mikrut <mikrutrafal@protonmail.com> | 2020-11-23 17:38:46 +0100 |
---|---|---|
committer | Rafał Mikrut <mikrutrafal@protonmail.com> | 2020-11-23 17:38:46 +0100 |
commit | 7bd03b718871137740c6bf074e984bba8dc113c3 (patch) | |
tree | c83a11a1ddae811a0ac2f7246f423678de2a106e /core/crypto | |
parent | 18023cc3ede6fd84842db77019085c383e807016 (diff) |
Initialize class/struct variables with default values in core/ and drivers/
Diffstat (limited to 'core/crypto')
-rw-r--r-- | core/crypto/aes_context.cpp | 1 | ||||
-rw-r--r-- | core/crypto/aes_context.h | 2 | ||||
-rw-r--r-- | core/crypto/crypto_core.h | 8 | ||||
-rw-r--r-- | core/crypto/hashing_context.h | 2 |
4 files changed, 6 insertions, 7 deletions
diff --git a/core/crypto/aes_context.cpp b/core/crypto/aes_context.cpp index 8ef1f4f1d4..608f3c912c 100644 --- a/core/crypto/aes_context.cpp +++ b/core/crypto/aes_context.cpp @@ -112,5 +112,4 @@ void AESContext::_bind_methods() { } AESContext::AESContext() { - mode = MODE_MAX; } diff --git a/core/crypto/aes_context.h b/core/crypto/aes_context.h index c23c504a72..557bde1f04 100644 --- a/core/crypto/aes_context.h +++ b/core/crypto/aes_context.h @@ -47,7 +47,7 @@ public: }; private: - Mode mode; + Mode mode = MODE_MAX; CryptoCore::AESContext ctx; PackedByteArray iv; diff --git a/core/crypto/crypto_core.h b/core/crypto/crypto_core.h index 57ba469f8d..c2ec6febe3 100644 --- a/core/crypto/crypto_core.h +++ b/core/crypto/crypto_core.h @@ -37,7 +37,7 @@ class CryptoCore { public: class MD5Context { private: - void *ctx; // To include, or not to include... + void *ctx = nullptr; // To include, or not to include... public: MD5Context(); @@ -50,7 +50,7 @@ public: class SHA1Context { private: - void *ctx; // To include, or not to include... + void *ctx = nullptr; // To include, or not to include... public: SHA1Context(); @@ -63,7 +63,7 @@ public: class SHA256Context { private: - void *ctx; // To include, or not to include... + void *ctx = nullptr; // To include, or not to include... public: SHA256Context(); @@ -76,7 +76,7 @@ public: class AESContext { private: - void *ctx; // To include, or not to include... + void *ctx = nullptr; // To include, or not to include... public: AESContext(); diff --git a/core/crypto/hashing_context.h b/core/crypto/hashing_context.h index 40d075afa9..7cd55ba267 100644 --- a/core/crypto/hashing_context.h +++ b/core/crypto/hashing_context.h @@ -45,7 +45,7 @@ public: private: void *ctx = nullptr; - HashType type; + HashType type = HASH_MD5; protected: static void _bind_methods(); |