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/pbkdf/pbkdf1/pbkdf1.cpp | 6 +++--- src/lib/pbkdf/pbkdf1/pbkdf1.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/lib/pbkdf/pbkdf1') diff --git a/src/lib/pbkdf/pbkdf1/pbkdf1.cpp b/src/lib/pbkdf/pbkdf1/pbkdf1.cpp index 49e1cf268..ad922ce9c 100644 --- a/src/lib/pbkdf/pbkdf1/pbkdf1.cpp +++ b/src/lib/pbkdf/pbkdf1/pbkdf1.cpp @@ -10,9 +10,9 @@ namespace Botan { -size_t PKCS5_PBKDF1::pbkdf(byte output_buf[], size_t output_len, +size_t PKCS5_PBKDF1::pbkdf(uint8_t output_buf[], size_t output_len, const std::string& passphrase, - const byte salt[], size_t salt_len, + const uint8_t salt[], size_t salt_len, size_t iterations, std::chrono::milliseconds msec) const { @@ -21,7 +21,7 @@ size_t PKCS5_PBKDF1::pbkdf(byte output_buf[], size_t output_len, m_hash->update(passphrase); m_hash->update(salt, salt_len); - secure_vector key = m_hash->final(); + secure_vector key = m_hash->final(); const auto start = std::chrono::high_resolution_clock::now(); size_t iterations_performed = 1; diff --git a/src/lib/pbkdf/pbkdf1/pbkdf1.h b/src/lib/pbkdf/pbkdf1/pbkdf1.h index cd10b3112..ca6542822 100644 --- a/src/lib/pbkdf/pbkdf1/pbkdf1.h +++ b/src/lib/pbkdf/pbkdf1/pbkdf1.h @@ -37,9 +37,9 @@ class BOTAN_DLL PKCS5_PBKDF1 final : public PBKDF return new PKCS5_PBKDF1(m_hash->clone()); } - size_t pbkdf(byte output_buf[], size_t output_len, + size_t pbkdf(uint8_t output_buf[], size_t output_len, const std::string& passphrase, - const byte salt[], size_t salt_len, + const uint8_t salt[], size_t salt_len, size_t iterations, std::chrono::milliseconds msec) const override; private: -- cgit v1.2.3