diff options
author | lloyd <[email protected]> | 2007-10-15 15:17:43 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2007-10-15 15:17:43 +0000 |
commit | 77afd52c616f50f5213b24f9b2df0d27e61c95f2 (patch) | |
tree | 114e3739ed1995c82a5ce17090584c2d78c6ae23 /src/prf_x942.cpp | |
parent | d01947a8935ef34ee365958f5f91256fe72c3ff3 (diff) |
Truncate the X9.42 PRF output if the counter overflows.
Diffstat (limited to 'src/prf_x942.cpp')
-rw-r--r-- | src/prf_x942.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/prf_x942.cpp b/src/prf_x942.cpp index fd29aecdd..99f223107 100644 --- a/src/prf_x942.cpp +++ b/src/prf_x942.cpp @@ -40,7 +40,7 @@ SecureVector<byte> X942_PRF::derive(u32bit key_len, SecureVector<byte> key; u32bit counter = 1; - while(key.size() != key_len) + while(key.size() != key_len && counter) { hash->update(secret, secret_len); |