aboutsummaryrefslogtreecommitdiff
path: root/src/server/authserver/Authentication
diff options
context:
space:
mode:
authorariel- <ariel-@users.noreply.github.com>2017-06-19 23:20:06 -0300
committerariel- <ariel-@users.noreply.github.com>2017-06-19 23:20:06 -0300
commit85a7d5ce9ac68b30da2277cc91d4b70358f1880d (patch)
treedf3d2084ee2e35008903c03178039b9c986e2d08 /src/server/authserver/Authentication
parent052fc24315ace866ea1cf610e85df119b68100c9 (diff)
Core: ported headers cleanup from master branch
Diffstat (limited to 'src/server/authserver/Authentication')
-rw-r--r--src/server/authserver/Authentication/AuthCodes.cpp2
-rw-r--r--src/server/authserver/Authentication/TOTP.cpp6
-rw-r--r--src/server/authserver/Authentication/TOTP.h2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/server/authserver/Authentication/AuthCodes.cpp b/src/server/authserver/Authentication/AuthCodes.cpp
index d0c41258130..4b6e78a72a3 100644
--- a/src/server/authserver/Authentication/AuthCodes.cpp
+++ b/src/server/authserver/Authentication/AuthCodes.cpp
@@ -77,6 +77,6 @@ namespace AuthHelper
if (PreBcAcceptedClientBuilds[i].Build == build)
return &PreBcAcceptedClientBuilds[i];
- return NULL;
+ return nullptr;
}
}
diff --git a/src/server/authserver/Authentication/TOTP.cpp b/src/server/authserver/Authentication/TOTP.cpp
index e26fd47e167..0566adea23a 100644
--- a/src/server/authserver/Authentication/TOTP.cpp
+++ b/src/server/authserver/Authentication/TOTP.cpp
@@ -18,7 +18,7 @@
#include "TOTP.h"
#include <cstring>
-int base32_decode(const char* encoded, char* result, int bufSize)
+int base32_decode(char const* encoded, char* result, int bufSize)
{
// Base32 implementation
// Copyright 2010 Google Inc.
@@ -68,7 +68,7 @@ int base32_decode(const char* encoded, char* result, int bufSize)
namespace TOTP
{
- unsigned int GenerateToken(const char* b32key)
+ unsigned int GenerateToken(char const* b32key)
{
size_t keySize = strlen(b32key);
int bufsize = (keySize + 7)/8*5;
@@ -76,7 +76,7 @@ namespace TOTP
memset(encoded, 0, bufsize);
unsigned int hmacResSize = HMAC_RES_SIZE;
unsigned char hmacRes[HMAC_RES_SIZE];
- unsigned long timestamp = time(NULL)/30;
+ unsigned long timestamp = time(nullptr)/30;
unsigned char challenge[8];
for (int i = 8; i--;timestamp >>= 8)
diff --git a/src/server/authserver/Authentication/TOTP.h b/src/server/authserver/Authentication/TOTP.h
index 94a3383e831..7137bb0e662 100644
--- a/src/server/authserver/Authentication/TOTP.h
+++ b/src/server/authserver/Authentication/TOTP.h
@@ -23,7 +23,7 @@
namespace TOTP
{
- unsigned int GenerateToken(const char* b32key);
+ unsigned int GenerateToken(char const* b32key);
}
#endif