summaryrefslogtreecommitdiff
path: root/node/Utils.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2017-02-05 16:19:03 -0800
committerAdam Ierymenko <adam.ierymenko@gmail.com>2017-02-05 16:19:03 -0800
commit43182f8f57483a47f1b44cdcf9dbb5387511afc2 (patch)
tree64643b558feb10a7950dda06b9cded0100bb73c9 /node/Utils.cpp
parent594cb1fad8db5b551982ae948d43a01b25494f05 (diff)
downloadinfinitytier-43182f8f57483a47f1b44cdcf9dbb5387511afc2.tar.gz
infinitytier-43182f8f57483a47f1b44cdcf9dbb5387511afc2.zip
Docs, code cleanup, and protect the extra new fields of HELLO with encryption as a precaution.
Diffstat (limited to 'node/Utils.cpp')
-rw-r--r--node/Utils.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/node/Utils.cpp b/node/Utils.cpp
index 06b726cc..247dd54a 100644
--- a/node/Utils.cpp
+++ b/node/Utils.cpp
@@ -182,7 +182,7 @@ void Utils::getSecureRandom(void *buf,unsigned int bytes)
#else // not __WINDOWS__
- static char randomBuf[131072];
+ static char randomBuf[65536];
static unsigned int randomPtr = sizeof(randomBuf);
static int devURandomFd = -1;
@@ -215,7 +215,7 @@ void Utils::getSecureRandom(void *buf,unsigned int bytes)
#endif // __WINDOWS__ or not
- s20.encrypt12(buf,buf,bytes);
+ s20.crypt12(buf,buf,bytes);
}
bool Utils::scopy(char *dest,unsigned int len,const char *src)