aboutsummaryrefslogtreecommitdiff
path: root/src/server/shared/Cryptography
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/shared/Cryptography')
-rw-r--r--src/server/shared/Cryptography/Authentication/AuthCrypt.cpp13
-rw-r--r--src/server/shared/Cryptography/Authentication/AuthCrypt.h1
-rw-r--r--src/server/shared/Cryptography/BigNumber.cpp9
-rw-r--r--src/server/shared/Cryptography/HMACSHA1.cpp2
4 files changed, 8 insertions, 17 deletions
diff --git a/src/server/shared/Cryptography/Authentication/AuthCrypt.cpp b/src/server/shared/Cryptography/Authentication/AuthCrypt.cpp
index 0f68fcb6c37..003c09e4589 100644
--- a/src/server/shared/Cryptography/Authentication/AuthCrypt.cpp
+++ b/src/server/shared/Cryptography/Authentication/AuthCrypt.cpp
@@ -20,15 +20,10 @@
#include "Cryptography/HMACSHA1.h"
#include "Cryptography/BigNumber.h"
-AuthCrypt::AuthCrypt() : _clientDecrypt(SHA_DIGEST_LENGTH), _serverEncrypt(SHA_DIGEST_LENGTH)
- , _initialized(false)
-{
-}
-
-AuthCrypt::~AuthCrypt()
-{
-
-}
+AuthCrypt::AuthCrypt() :
+ _clientDecrypt(SHA_DIGEST_LENGTH), _serverEncrypt(SHA_DIGEST_LENGTH),
+ _initialized(false)
+{ }
void AuthCrypt::Init(BigNumber* K)
{
diff --git a/src/server/shared/Cryptography/Authentication/AuthCrypt.h b/src/server/shared/Cryptography/Authentication/AuthCrypt.h
index 200681afd08..95e773b586e 100644
--- a/src/server/shared/Cryptography/Authentication/AuthCrypt.h
+++ b/src/server/shared/Cryptography/Authentication/AuthCrypt.h
@@ -27,7 +27,6 @@ class AuthCrypt
{
public:
AuthCrypt();
- ~AuthCrypt();
void Init(BigNumber* K);
void DecryptRecv(uint8 *, size_t);
diff --git a/src/server/shared/Cryptography/BigNumber.cpp b/src/server/shared/Cryptography/BigNumber.cpp
index 37778cceab8..06ea57b662e 100644
--- a/src/server/shared/Cryptography/BigNumber.cpp
+++ b/src/server/shared/Cryptography/BigNumber.cpp
@@ -24,18 +24,15 @@
#include <algorithm>
BigNumber::BigNumber()
- : _bn(BN_new())
- , _array(NULL)
+ : _bn(BN_new()), _array(NULL)
{ }
BigNumber::BigNumber(BigNumber const& bn)
- : _bn(BN_dup(bn._bn))
- , _array(NULL)
+ : _bn(BN_dup(bn._bn)), _array(NULL)
{ }
BigNumber::BigNumber(uint32 val)
- : _bn(BN_new())
- , _array(NULL)
+ : _bn(BN_new()), _array(NULL)
{
BN_set_word(_bn, val);
}
diff --git a/src/server/shared/Cryptography/HMACSHA1.cpp b/src/server/shared/Cryptography/HMACSHA1.cpp
index ab50eb9981a..297b4e90316 100644
--- a/src/server/shared/Cryptography/HMACSHA1.cpp
+++ b/src/server/shared/Cryptography/HMACSHA1.cpp
@@ -40,7 +40,7 @@ void HmacHash::Finalize()
{
uint32 length = 0;
HMAC_Final(&m_ctx, (uint8*)m_digest, &length);
- ASSERT(length == SHA_DIGEST_LENGTH)
+ ASSERT(length == SHA_DIGEST_LENGTH);
}
uint8 *HmacHash::ComputeHash(BigNumber* bn)