aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pk_pad/mgf1
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/pk_pad/mgf1
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/pk_pad/mgf1')
-rw-r--r--src/lib/pk_pad/mgf1/mgf1.cpp8
-rw-r--r--src/lib/pk_pad/mgf1/mgf1.h4
2 files changed, 6 insertions, 6 deletions
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<byte> buffer = hash.final();
+ secure_vector<uint8_t> buffer = hash.final();
size_t xored = std::min<size_t>(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);
}