aboutsummaryrefslogtreecommitdiff
path: root/src/common/Cryptography/HMACSHA1.cpp
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/common/Cryptography/HMACSHA1.cpp
parent052fc24315ace866ea1cf610e85df119b68100c9 (diff)
Core: ported headers cleanup from master branch
Diffstat (limited to 'src/common/Cryptography/HMACSHA1.cpp')
-rw-r--r--src/common/Cryptography/HMACSHA1.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/common/Cryptography/HMACSHA1.cpp b/src/common/Cryptography/HMACSHA1.cpp
index a10c012e896..c6936cacaef 100644
--- a/src/common/Cryptography/HMACSHA1.cpp
+++ b/src/common/Cryptography/HMACSHA1.cpp
@@ -18,12 +18,13 @@
#include "HMACSHA1.h"
#include "BigNumber.h"
-#include "Common.h"
+#include "Errors.h"
+#include <cstring>
-HmacHash::HmacHash(uint32 len, uint8 *seed)
+HmacHash::HmacHash(uint32 len, uint8* seed)
{
HMAC_CTX_init(&m_ctx);
- HMAC_Init_ex(&m_ctx, seed, len, EVP_sha1(), NULL);
+ HMAC_Init_ex(&m_ctx, seed, len, EVP_sha1(), nullptr);
memset(m_digest, 0, sizeof(m_digest));
}
@@ -32,12 +33,12 @@ HmacHash::~HmacHash()
HMAC_CTX_cleanup(&m_ctx);
}
-void HmacHash::UpdateData(const std::string &str)
+void HmacHash::UpdateData(std::string const& str)
{
HMAC_Update(&m_ctx, (uint8 const*)str.c_str(), str.length());
}
-void HmacHash::UpdateData(const uint8* data, size_t len)
+void HmacHash::UpdateData(uint8 const* data, size_t len)
{
HMAC_Update(&m_ctx, data, len);
}