diff options
author | lloyd <[email protected]> | 2010-10-12 23:33:20 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-10-12 23:33:20 +0000 |
commit | 2e42b5aaaf8d817f612518afa91a5bc9d1465eb7 (patch) | |
tree | 4493e204226ee3954ec155c65b71bf567404d30c /src/pbkdf/pbkdf1/pbkdf1.cpp | |
parent | 2af9ba577730f071eef44b3ba492c3bfad0a8ec6 (diff) |
s/u32bit/size_t/ in pbkdf
Diffstat (limited to 'src/pbkdf/pbkdf1/pbkdf1.cpp')
-rw-r--r-- | src/pbkdf/pbkdf1/pbkdf1.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pbkdf/pbkdf1/pbkdf1.cpp b/src/pbkdf/pbkdf1/pbkdf1.cpp index 20875ebc2..017153557 100644 --- a/src/pbkdf/pbkdf1/pbkdf1.cpp +++ b/src/pbkdf/pbkdf1/pbkdf1.cpp @@ -13,10 +13,10 @@ namespace Botan { /* * Return a PKCS#5 PBKDF1 derived key */ -OctetString PKCS5_PBKDF1::derive_key(u32bit key_len, +OctetString PKCS5_PBKDF1::derive_key(size_t key_len, const std::string& passphrase, - const byte salt[], u32bit salt_size, - u32bit iterations) const + const byte salt[], size_t salt_size, + size_t iterations) const { if(iterations == 0) throw Invalid_Argument("PKCS5_PBKDF1: Invalid iteration count"); @@ -28,13 +28,13 @@ OctetString PKCS5_PBKDF1::derive_key(u32bit key_len, hash->update(salt, salt_size); SecureVector<byte> key = hash->final(); - for(u32bit j = 1; j != iterations; ++j) + for(size_t j = 1; j != iterations; ++j) { hash->update(key); hash->final(&key[0]); } - return OctetString(&key[0], std::min<u32bit>(key_len, key.size())); + return OctetString(&key[0], std::min<size_t>(key_len, key.size())); } } |