diff options
author | Jack Lloyd <[email protected]> | 2016-12-11 15:28:38 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-12-18 16:48:24 -0500 |
commit | f3cb3edb512bdcab498d825886c3366c341b3f78 (patch) | |
tree | 645c73ec295a5a34f25d99903b6d9fa9751e86d3 /src/lib/hash/comb4p | |
parent | c1dd21253c1f3188ff45d3ad47698efd08235ae8 (diff) |
Convert to using standard uintN_t integer types
Renames a couple of functions for somewhat better name consistency,
eg make_u32bit becomes make_uint32. The old typedefs remain for now
since probably lots of application code uses them.
Diffstat (limited to 'src/lib/hash/comb4p')
-rw-r--r-- | src/lib/hash/comb4p/comb4p.cpp | 16 | ||||
-rw-r--r-- | src/lib/hash/comb4p/comb4p.h | 4 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/hash/comb4p/comb4p.cpp b/src/lib/hash/comb4p/comb4p.cpp index 4659ace77..ece8c9051 100644 --- a/src/lib/hash/comb4p/comb4p.cpp +++ b/src/lib/hash/comb4p/comb4p.cpp @@ -12,9 +12,9 @@ namespace Botan { namespace { -void comb4p_round(secure_vector<byte>& out, - const secure_vector<byte>& in, - byte round_no, +void comb4p_round(secure_vector<uint8_t>& out, + const secure_vector<uint8_t>& in, + uint8_t round_no, HashFunction& h1, HashFunction& h2) { @@ -24,7 +24,7 @@ void comb4p_round(secure_vector<byte>& out, h1.update(in.data(), in.size()); h2.update(in.data(), in.size()); - secure_vector<byte> h_buf = h1.final(); + secure_vector<uint8_t> h_buf = h1.final(); xor_buf(out.data(), h_buf.data(), std::min(out.size(), h_buf.size())); h_buf = h2.final(); @@ -69,16 +69,16 @@ void Comb4P::clear() m_hash2->update(0); } -void Comb4P::add_data(const byte input[], size_t length) +void Comb4P::add_data(const uint8_t input[], size_t length) { m_hash1->update(input, length); m_hash2->update(input, length); } -void Comb4P::final_result(byte out[]) +void Comb4P::final_result(uint8_t out[]) { - secure_vector<byte> h1 = m_hash1->final(); - secure_vector<byte> h2 = m_hash2->final(); + secure_vector<uint8_t> h1 = m_hash1->final(); + secure_vector<uint8_t> h2 = m_hash2->final(); // First round xor_buf(h1.data(), h2.data(), std::min(h1.size(), h2.size())); diff --git a/src/lib/hash/comb4p/comb4p.h b/src/lib/hash/comb4p/comb4p.h index cb78914e7..a578b56c8 100644 --- a/src/lib/hash/comb4p/comb4p.h +++ b/src/lib/hash/comb4p/comb4p.h @@ -44,8 +44,8 @@ class BOTAN_DLL Comb4P final : public HashFunction void clear() override; private: - void add_data(const byte input[], size_t length) override; - void final_result(byte out[]) override; + void add_data(const uint8_t input[], size_t length) override; + void final_result(uint8_t out[]) override; std::unique_ptr<HashFunction> m_hash1, m_hash2; }; |