aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pbkdf/pbkdf2
diff options
context:
space:
mode:
authorSimon Warta <[email protected]>2015-06-23 20:12:35 +0200
committerSimon Warta <[email protected]>2015-06-23 20:12:35 +0200
commit2f729838547e1c9ce475ecc91c361f0531e1df61 (patch)
treea6acc824ed91deae9fed42b34aecb50af907a75e /src/lib/pbkdf/pbkdf2
parentfd1c77c5cf8d86c6ba6d2f5c8cf898502c463eba (diff)
lib/pbkdf: Convert &vec[0] to vec.data()
Diffstat (limited to 'src/lib/pbkdf/pbkdf2')
-rw-r--r--src/lib/pbkdf/pbkdf2/pbkdf2.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/pbkdf/pbkdf2/pbkdf2.cpp b/src/lib/pbkdf/pbkdf2/pbkdf2.cpp
index ab3735bac..a27b9b15c 100644
--- a/src/lib/pbkdf/pbkdf2/pbkdf2.cpp
+++ b/src/lib/pbkdf/pbkdf2/pbkdf2.cpp
@@ -66,9 +66,9 @@ pbkdf2(MessageAuthenticationCode& prf,
prf.update(salt, salt_len);
prf.update_be(counter++);
- prf.final(&U[0]);
+ prf.final(U.data());
- xor_buf(out, &U[0], prf_output);
+ xor_buf(out, U.data(), prf_output);
if(iterations == 0)
{
@@ -84,8 +84,8 @@ pbkdf2(MessageAuthenticationCode& prf,
while(true)
{
prf.update(U);
- prf.final(&U[0]);
- xor_buf(out, &U[0], prf_output);
+ prf.final(U.data());
+ xor_buf(out, U.data(), prf_output);
iterations++;
/*
@@ -107,8 +107,8 @@ pbkdf2(MessageAuthenticationCode& prf,
for(size_t i = 1; i != iterations; ++i)
{
prf.update(U);
- prf.final(&U[0]);
- xor_buf(out, &U[0], prf_output);
+ prf.final(U.data());
+ xor_buf(out, U.data(), prf_output);
}
}