aboutsummaryrefslogtreecommitdiffstats
path: root/src/pbkdf/pbkdf1/pbkdf1.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pbkdf/pbkdf1/pbkdf1.cpp')
-rw-r--r--src/pbkdf/pbkdf1/pbkdf1.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pbkdf/pbkdf1/pbkdf1.cpp b/src/pbkdf/pbkdf1/pbkdf1.cpp
index d9bdf1b1f..20875ebc2 100644
--- a/src/pbkdf/pbkdf1/pbkdf1.cpp
+++ b/src/pbkdf/pbkdf1/pbkdf1.cpp
@@ -31,10 +31,10 @@ OctetString PKCS5_PBKDF1::derive_key(u32bit key_len,
for(u32bit j = 1; j != iterations; ++j)
{
hash->update(key);
- hash->final(key);
+ hash->final(&key[0]);
}
- return OctetString(key, std::min<u32bit>(key_len, key.size()));
+ return OctetString(&key[0], std::min<u32bit>(key_len, key.size()));
}
}