aboutsummaryrefslogtreecommitdiffstats
path: root/src/kdf/x942_prf/prf_x942.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kdf/x942_prf/prf_x942.cpp')
-rw-r--r--src/kdf/x942_prf/prf_x942.cpp8
1 files changed, 4 insertions, 4 deletions
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<byte> encode_x942_int(u32bit n)
/*
* X9.42 PRF
*/
-SecureVector<byte> X942_PRF::derive(u32bit key_len,
- const byte secret[], u32bit secret_len,
- const byte salt[], u32bit salt_len) const
+SecureVector<byte> 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<byte> X942_PRF::derive(u32bit key_len,
);
SecureVector<byte> 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;