aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pbkdf/pbkdf.cpp
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/pbkdf/pbkdf.cpp
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/pbkdf/pbkdf.cpp')
-rw-r--r--src/lib/pbkdf/pbkdf.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/pbkdf/pbkdf.cpp b/src/lib/pbkdf/pbkdf.cpp
index a3485654b..d9479bd8d 100644
--- a/src/lib/pbkdf/pbkdf.cpp
+++ b/src/lib/pbkdf/pbkdf.cpp
@@ -60,18 +60,18 @@ std::vector<std::string> PBKDF::providers(const std::string& algo_spec)
return probe_providers_of<PBKDF>(algo_spec, { "base", "openssl" });
}
-void PBKDF::pbkdf_timed(byte out[], size_t out_len,
+void PBKDF::pbkdf_timed(uint8_t out[], size_t out_len,
const std::string& passphrase,
- const byte salt[], size_t salt_len,
+ const uint8_t salt[], size_t salt_len,
std::chrono::milliseconds msec,
size_t& iterations) const
{
iterations = pbkdf(out, out_len, passphrase, salt, salt_len, 0, msec);
}
-void PBKDF::pbkdf_iterations(byte out[], size_t out_len,
+void PBKDF::pbkdf_iterations(uint8_t out[], size_t out_len,
const std::string& passphrase,
- const byte salt[], size_t salt_len,
+ const uint8_t salt[], size_t salt_len,
size_t iterations) const
{
if(iterations == 0)
@@ -83,23 +83,23 @@ void PBKDF::pbkdf_iterations(byte out[], size_t out_len,
BOTAN_ASSERT_EQUAL(iterations, iterations_run, "Expected PBKDF iterations");
}
-secure_vector<byte> PBKDF::pbkdf_iterations(size_t out_len,
+secure_vector<uint8_t> PBKDF::pbkdf_iterations(size_t out_len,
const std::string& passphrase,
- const byte salt[], size_t salt_len,
+ const uint8_t salt[], size_t salt_len,
size_t iterations) const
{
- secure_vector<byte> out(out_len);
+ secure_vector<uint8_t> out(out_len);
pbkdf_iterations(out.data(), out_len, passphrase, salt, salt_len, iterations);
return out;
}
-secure_vector<byte> PBKDF::pbkdf_timed(size_t out_len,
+secure_vector<uint8_t> PBKDF::pbkdf_timed(size_t out_len,
const std::string& passphrase,
- const byte salt[], size_t salt_len,
+ const uint8_t salt[], size_t salt_len,
std::chrono::milliseconds msec,
size_t& iterations) const
{
- secure_vector<byte> out(out_len);
+ secure_vector<uint8_t> out(out_len);
pbkdf_timed(out.data(), out_len, passphrase, salt, salt_len, msec, iterations);
return out;
}