aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/block/cascade
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-12-11 15:28:38 -0500
committerJack Lloyd <[email protected]>2016-12-18 16:48:24 -0500
commitf3cb3edb512bdcab498d825886c3366c341b3f78 (patch)
tree645c73ec295a5a34f25d99903b6d9fa9751e86d3 /src/lib/block/cascade
parentc1dd21253c1f3188ff45d3ad47698efd08235ae8 (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/block/cascade')
-rw-r--r--src/lib/block/cascade/cascade.cpp8
-rw-r--r--src/lib/block/cascade/cascade.h6
2 files changed, 7 insertions, 7 deletions
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<BlockCipher> m_cipher1, m_cipher2;