From e3e02712563e03fbfd6b474cfaa7c0dfdf08f267 Mon Sep 17 00:00:00 2001 From: lloyd Date: Tue, 12 Oct 2010 16:23:03 +0000 Subject: s/u32bit/size_t/ in kdf --- src/kdf/x942_prf/prf_x942.cpp | 8 ++++---- src/kdf/x942_prf/prf_x942.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/kdf/x942_prf') diff --git a/src/kdf/x942_prf/prf_x942.cpp b/src/kdf/x942_prf/prf_x942.cpp index 35402ad28..966d883b6 100644 --- a/src/kdf/x942_prf/prf_x942.cpp +++ b/src/kdf/x942_prf/prf_x942.cpp @@ -32,9 +32,9 @@ MemoryVector encode_x942_int(u32bit n) /* * X9.42 PRF */ -SecureVector X942_PRF::derive(u32bit key_len, - const byte secret[], u32bit secret_len, - const byte salt[], u32bit salt_len) const +SecureVector X942_PRF::derive(size_t key_len, + const byte secret[], size_t secret_len, + const byte salt[], size_t salt_len) const { SHA_160 hash; const OID kek_algo(key_wrap_oid); @@ -69,7 +69,7 @@ SecureVector X942_PRF::derive(u32bit key_len, ); SecureVector digest = hash.final(); - const u32bit needed = std::min(digest.size(), key_len - key.size()); + const size_t needed = std::min(digest.size(), key_len - key.size()); key += std::make_pair(&digest[0], needed); ++counter; diff --git a/src/kdf/x942_prf/prf_x942.h b/src/kdf/x942_prf/prf_x942.h index a5fe9f351..8efc6ea45 100644 --- a/src/kdf/x942_prf/prf_x942.h +++ b/src/kdf/x942_prf/prf_x942.h @@ -18,8 +18,8 @@ namespace Botan { class BOTAN_DLL X942_PRF : public KDF { public: - SecureVector derive(u32bit, const byte[], u32bit, - const byte[], u32bit) const; + SecureVector derive(size_t, const byte[], size_t, + const byte[], size_t) const; X942_PRF(const std::string&); private: -- cgit v1.2.3