diff options
| author | Shauren <shauren.trinity@gmail.com> | 2017-06-07 17:23:50 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2017-06-07 17:23:50 +0200 |
| commit | 4226eb2ea56a13f1e499b80e51cb73748cff82a1 (patch) | |
| tree | 3cf644eaebb18b2426583c948d163d14176a220b /src/common/Cryptography | |
| parent | 7e9a0414708ed1f9373c4c0e87ade501d3f7bc98 (diff) | |
Core/Misc: Some /W4 warning fixes
Diffstat (limited to 'src/common/Cryptography')
| -rw-r--r-- | src/common/Cryptography/SHA256.cpp | 4 | ||||
| -rw-r--r-- | src/common/Cryptography/SHA256.h | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/common/Cryptography/SHA256.cpp b/src/common/Cryptography/SHA256.cpp index abb254d7f3a..976c9ade2ac 100644 --- a/src/common/Cryptography/SHA256.cpp +++ b/src/common/Cryptography/SHA256.cpp @@ -31,9 +31,9 @@ SHA256Hash::~SHA256Hash() SHA256_Init(&mC); } -void SHA256Hash::UpdateData(const uint8 *dta, int len) +void SHA256Hash::UpdateData(uint8 const* data, size_t len) { - SHA256_Update(&mC, dta, len); + SHA256_Update(&mC, data, len); } void SHA256Hash::UpdateData(const std::string &str) diff --git a/src/common/Cryptography/SHA256.h b/src/common/Cryptography/SHA256.h index 1ad46bba51e..93583eb227d 100644 --- a/src/common/Cryptography/SHA256.h +++ b/src/common/Cryptography/SHA256.h @@ -35,14 +35,14 @@ class TC_COMMON_API SHA256Hash void UpdateBigNumbers(BigNumber* bn0, ...); - void UpdateData(const uint8 *dta, int len); - void UpdateData(const std::string &str); + void UpdateData(uint8 const* data, size_t len); + void UpdateData(std::string const& str); void Initialize(); void Finalize(); - uint8 *GetDigest(void) { return mDigest; } - int GetLength(void) const { return SHA256_DIGEST_LENGTH; } + uint8 *GetDigest() { return mDigest; } + uint32 GetLength() const { return SHA256_DIGEST_LENGTH; } private: SHA256_CTX mC; |
