diff options
Diffstat (limited to 'src/kdf/x942_prf/prf_x942.cpp')
-rw-r--r-- | src/kdf/x942_prf/prf_x942.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/kdf/x942_prf/prf_x942.cpp b/src/kdf/x942_prf/prf_x942.cpp index d9ee09d20..35402ad28 100644 --- a/src/kdf/x942_prf/prf_x942.cpp +++ b/src/kdf/x942_prf/prf_x942.cpp @@ -69,7 +69,8 @@ SecureVector<byte> X942_PRF::derive(u32bit key_len, ); SecureVector<byte> digest = hash.final(); - key.append(digest, std::min(digest.size(), key_len - key.size())); + const u32bit needed = std::min(digest.size(), key_len - key.size()); + key += std::make_pair(&digest[0], needed); ++counter; } |