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/keccak | |
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/keccak')
-rw-r--r-- | src/lib/hash/keccak/keccak.cpp | 6 | ||||
-rw-r--r-- | src/lib/hash/keccak/keccak.h | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/hash/keccak/keccak.cpp b/src/lib/hash/keccak/keccak.cpp index e0c67131b..1d2747ff2 100644 --- a/src/lib/hash/keccak/keccak.cpp +++ b/src/lib/hash/keccak/keccak.cpp @@ -42,14 +42,14 @@ void Keccak_1600::clear() m_S_pos = 0; } -void Keccak_1600::add_data(const byte input[], size_t length) +void Keccak_1600::add_data(const uint8_t input[], size_t length) { m_S_pos = SHA_3::absorb(m_bitrate, m_S, m_S_pos, input, length); } -void Keccak_1600::final_result(byte output[]) +void Keccak_1600::final_result(uint8_t output[]) { - std::vector<byte> padding(m_bitrate / 8 - m_S_pos); + std::vector<uint8_t> padding(m_bitrate / 8 - m_S_pos); padding[0] = 0x01; padding[padding.size()-1] |= 0x80; diff --git a/src/lib/hash/keccak/keccak.h b/src/lib/hash/keccak/keccak.h index ac50d4c52..a2c14c65a 100644 --- a/src/lib/hash/keccak/keccak.h +++ b/src/lib/hash/keccak/keccak.h @@ -35,11 +35,11 @@ class BOTAN_DLL Keccak_1600 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; size_t m_output_bits, m_bitrate; - secure_vector<u64bit> m_S; + secure_vector<uint64_t> m_S; size_t m_S_pos; }; |