From f3cb3edb512bdcab498d825886c3366c341b3f78 Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Sun, 11 Dec 2016 15:28:38 -0500 Subject: 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. --- src/lib/block/cascade/cascade.cpp | 8 ++++---- src/lib/block/cascade/cascade.h | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/lib/block/cascade') diff --git a/src/lib/block/cascade/cascade.cpp b/src/lib/block/cascade/cascade.cpp index 98e862de9..e54d3e5b5 100644 --- a/src/lib/block/cascade/cascade.cpp +++ b/src/lib/block/cascade/cascade.cpp @@ -9,7 +9,7 @@ namespace Botan { -void Cascade_Cipher::encrypt_n(const byte in[], byte out[], +void Cascade_Cipher::encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const { size_t c1_blocks = blocks * (block_size() / m_cipher1->block_size()); @@ -19,7 +19,7 @@ void Cascade_Cipher::encrypt_n(const byte in[], byte out[], m_cipher2->encrypt_n(out, out, c2_blocks); } -void Cascade_Cipher::decrypt_n(const byte in[], byte out[], +void Cascade_Cipher::decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const { size_t c1_blocks = blocks * (block_size() / m_cipher1->block_size()); @@ -29,9 +29,9 @@ void Cascade_Cipher::decrypt_n(const byte in[], byte out[], m_cipher1->decrypt_n(out, out, c1_blocks); } -void Cascade_Cipher::key_schedule(const byte key[], size_t) +void Cascade_Cipher::key_schedule(const uint8_t key[], size_t) { - const byte* key2 = key + m_cipher1->maximum_keylength(); + const uint8_t* key2 = key + m_cipher1->maximum_keylength(); m_cipher1->set_key(key , m_cipher1->maximum_keylength()); m_cipher2->set_key(key2, m_cipher2->maximum_keylength()); diff --git a/src/lib/block/cascade/cascade.h b/src/lib/block/cascade/cascade.h index aa7bd0421..1ab81b9b5 100644 --- a/src/lib/block/cascade/cascade.h +++ b/src/lib/block/cascade/cascade.h @@ -18,8 +18,8 @@ namespace Botan { class BOTAN_DLL Cascade_Cipher final : public BlockCipher { public: - void encrypt_n(const byte in[], byte out[], size_t blocks) const override; - void decrypt_n(const byte in[], byte out[], size_t blocks) const override; + void encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override; + void decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override; size_t block_size() const override { return m_block; } @@ -43,7 +43,7 @@ class BOTAN_DLL Cascade_Cipher final : public BlockCipher Cascade_Cipher(const Cascade_Cipher&) = delete; Cascade_Cipher& operator=(const Cascade_Cipher&) = delete; private: - void key_schedule(const byte[], size_t) override; + void key_schedule(const uint8_t[], size_t) override; size_t m_block; std::unique_ptr m_cipher1, m_cipher2; -- cgit v1.2.3