diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2017-07-06 16:11:11 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2017-07-06 16:11:11 -0700 |
| commit | d2415dee00914ab3fd7016758f4184d46bb407a5 (patch) | |
| tree | 3e314c3464b1ddc86423cd1081cf65183e1a0fa4 /node/RuntimeEnvironment.hpp | |
| parent | 53728b79b45417bc8f36464e13121229858f6ca5 (diff) | |
| download | infinitytier-d2415dee00914ab3fd7016758f4184d46bb407a5.tar.gz infinitytier-d2415dee00914ab3fd7016758f4184d46bb407a5.zip | |
Cleanup.
Diffstat (limited to 'node/RuntimeEnvironment.hpp')
| -rw-r--r-- | node/RuntimeEnvironment.hpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/node/RuntimeEnvironment.hpp b/node/RuntimeEnvironment.hpp index 99afe25d..94b96d34 100644 --- a/node/RuntimeEnvironment.hpp +++ b/node/RuntimeEnvironment.hpp @@ -27,7 +27,7 @@ #ifndef ZT_RUNTIMEENVIRONMENT_HPP #define ZT_RUNTIMEENVIRONMENT_HPP -#include <string> +#include <string.h> #include "Constants.hpp" #include "Utils.hpp" @@ -60,11 +60,13 @@ public: ,sa((SelfAwareness *)0) { Utils::getSecureRandom(&instanceId,sizeof(instanceId)); + memset(publicIdentityStr,0,sizeof(publicIdentityStr)); + memset(secretIdentityStr,0,sizeof(secretIdentityStr)); } ~RuntimeEnvironment() { - Utils::burn(reinterpret_cast<void *>(const_cast<char *>(secretIdentityStr.data())),(unsigned int)secretIdentityStr.length()); + Utils::burn(secretIdentityStr,sizeof(secretIdentityStr)); } /** @@ -77,8 +79,8 @@ public: // This node's identity Identity identity; - std::string publicIdentityStr; - std::string secretIdentityStr; + char publicIdentityStr[ZT_IDENTITY_STRING_BUFFER_LENGTH]; + char secretIdentityStr[ZT_IDENTITY_STRING_BUFFER_LENGTH]; // This is set externally to an instance of this base class NetworkController *localNetworkController; |
