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/pk_pad/mgf1/mgf1.cpp | 8 ++++---- src/lib/pk_pad/mgf1/mgf1.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/lib/pk_pad/mgf1') diff --git a/src/lib/pk_pad/mgf1/mgf1.cpp b/src/lib/pk_pad/mgf1/mgf1.cpp index 34bc4a9a9..8903ac6f0 100644 --- a/src/lib/pk_pad/mgf1/mgf1.cpp +++ b/src/lib/pk_pad/mgf1/mgf1.cpp @@ -12,16 +12,16 @@ namespace Botan { void mgf1_mask(HashFunction& hash, - const byte in[], size_t in_len, - byte out[], size_t out_len) + const uint8_t in[], size_t in_len, + uint8_t out[], size_t out_len) { - u32bit counter = 0; + uint32_t counter = 0; while(out_len) { hash.update(in, in_len); hash.update_be(counter); - secure_vector buffer = hash.final(); + secure_vector buffer = hash.final(); size_t xored = std::min(buffer.size(), out_len); xor_buf(out, buffer.data(), xored); diff --git a/src/lib/pk_pad/mgf1/mgf1.h b/src/lib/pk_pad/mgf1/mgf1.h index 034b0328e..27160bd9a 100644 --- a/src/lib/pk_pad/mgf1/mgf1.h +++ b/src/lib/pk_pad/mgf1/mgf1.h @@ -21,8 +21,8 @@ namespace Botan { * @param out_len size of the output buffer in bytes */ void BOTAN_DLL mgf1_mask(HashFunction& hash, - const byte in[], size_t in_len, - byte out[], size_t out_len); + const uint8_t in[], size_t in_len, + uint8_t out[], size_t out_len); } -- cgit v1.2.3