aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/kdf/kdf2
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/kdf/kdf2
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/kdf/kdf2')
-rw-r--r--src/lib/kdf/kdf2/kdf2.cpp12
-rw-r--r--src/lib/kdf/kdf2/kdf2.h8
2 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/kdf/kdf2/kdf2.cpp b/src/lib/kdf/kdf2/kdf2.cpp
index 760ebfc83..0f10b7b8f 100644
--- a/src/lib/kdf/kdf2/kdf2.cpp
+++ b/src/lib/kdf/kdf2/kdf2.cpp
@@ -9,13 +9,13 @@
namespace Botan {
-size_t KDF2::kdf(byte key[], size_t key_len,
- const byte secret[], size_t secret_len,
- const byte salt[], size_t salt_len,
- const byte label[], size_t label_len) const
+size_t KDF2::kdf(uint8_t key[], size_t key_len,
+ const uint8_t secret[], size_t secret_len,
+ const uint8_t salt[], size_t salt_len,
+ const uint8_t label[], size_t label_len) const
{
- u32bit counter = 1;
- secure_vector<byte> h;
+ uint32_t counter = 1;
+ secure_vector<uint8_t> h;
size_t offset = 0;
while(offset != key_len && counter != 0)
diff --git a/src/lib/kdf/kdf2/kdf2.h b/src/lib/kdf/kdf2/kdf2.h
index 2ead49530..5683aeb8a 100644
--- a/src/lib/kdf/kdf2/kdf2.h
+++ b/src/lib/kdf/kdf2/kdf2.h
@@ -23,10 +23,10 @@ class BOTAN_DLL KDF2 final : public KDF
KDF* clone() const override { return new KDF2(m_hash->clone()); }
- size_t kdf(byte key[], size_t key_len,
- const byte secret[], size_t secret_len,
- const byte salt[], size_t salt_len,
- const byte label[], size_t label_len) const override;
+ size_t kdf(uint8_t key[], size_t key_len,
+ const uint8_t secret[], size_t secret_len,
+ const uint8_t salt[], size_t salt_len,
+ const uint8_t label[], size_t label_len) const override;
/**
* @param h hash function to use