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/mac/x919_mac | |
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/mac/x919_mac')
-rw-r--r-- | src/lib/mac/x919_mac/x919_mac.cpp | 6 | ||||
-rw-r--r-- | src/lib/mac/x919_mac/x919_mac.h | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/mac/x919_mac/x919_mac.cpp b/src/lib/mac/x919_mac/x919_mac.cpp index 205d812c2..189108377 100644 --- a/src/lib/mac/x919_mac/x919_mac.cpp +++ b/src/lib/mac/x919_mac/x919_mac.cpp @@ -12,7 +12,7 @@ namespace Botan { /* * Update an ANSI X9.19 MAC Calculation */ -void ANSI_X919_MAC::add_data(const byte input[], size_t length) +void ANSI_X919_MAC::add_data(const uint8_t input[], size_t length) { size_t xored = std::min(8 - m_position, length); xor_buf(&m_state[m_position], input, xored); @@ -38,7 +38,7 @@ void ANSI_X919_MAC::add_data(const byte input[], size_t length) /* * Finalize an ANSI X9.19 MAC Calculation */ -void ANSI_X919_MAC::final_result(byte mac[]) +void ANSI_X919_MAC::final_result(uint8_t mac[]) { if(m_position) m_des1->encrypt(m_state); @@ -51,7 +51,7 @@ void ANSI_X919_MAC::final_result(byte mac[]) /* * ANSI X9.19 MAC Key Schedule */ -void ANSI_X919_MAC::key_schedule(const byte key[], size_t length) +void ANSI_X919_MAC::key_schedule(const uint8_t key[], size_t length) { m_des1->set_key(key, 8); diff --git a/src/lib/mac/x919_mac/x919_mac.h b/src/lib/mac/x919_mac/x919_mac.h index 904931d20..8e300cb34 100644 --- a/src/lib/mac/x919_mac/x919_mac.h +++ b/src/lib/mac/x919_mac/x919_mac.h @@ -35,12 +35,12 @@ class BOTAN_DLL ANSI_X919_MAC final : public MessageAuthenticationCode ANSI_X919_MAC(const ANSI_X919_MAC&) = delete; ANSI_X919_MAC& operator=(const ANSI_X919_MAC&) = delete; private: - void add_data(const byte[], size_t) override; - void final_result(byte[]) override; - void key_schedule(const byte[], size_t) override; + void add_data(const uint8_t[], size_t) override; + void final_result(uint8_t[]) override; + void key_schedule(const uint8_t[], size_t) override; std::unique_ptr<BlockCipher> m_des1, m_des2; - secure_vector<byte> m_state; + secure_vector<uint8_t> m_state; size_t m_position; }; |