aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/mac/poly1305
diff options
context:
space:
mode:
authorSimon Warta <[email protected]>2015-06-25 11:16:28 +0200
committerSimon Warta <[email protected]>2015-06-25 11:16:28 +0200
commit026329021ca6693be545752238c517d477166a63 (patch)
tree76f45908577064e32f95280cd116b63fde9c72f7 /src/lib/mac/poly1305
parent1033054c1495d4a10afc33f2747d24d9c32b6907 (diff)
lib/mac: Convert &vec[0] to vec.data()
Diffstat (limited to 'src/lib/mac/poly1305')
-rw-r--r--src/lib/mac/poly1305/poly1305.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/mac/poly1305/poly1305.cpp b/src/lib/mac/poly1305/poly1305.cpp
index 01f84cb32..545a749fa 100644
--- a/src/lib/mac/poly1305/poly1305.cpp
+++ b/src/lib/mac/poly1305/poly1305.cpp
@@ -132,10 +132,10 @@ void poly1305_finish(secure_vector<u64bit>& X, byte mac[16])
h0 = ((h0 ) | (h1 << 44));
h1 = ((h1 >> 20) | (h2 << 24));
- store_le(&mac[0], h0, h1);
+ store_le(mac, h0, h1);
/* zero out the state */
- clear_mem(&X[0], X.size());
+ clear_mem(X.data(), X.size());
}
}
@@ -166,7 +166,7 @@ void Poly1305::add_data(const byte input[], size_t length)
if(m_buf_pos + length >= m_buf.size())
{
- poly1305_blocks(m_poly, &m_buf[0], 1);
+ poly1305_blocks(m_poly, m_buf.data(), 1);
input += (m_buf.size() - m_buf_pos);
length -= (m_buf.size() - m_buf_pos);
m_buf_pos = 0;
@@ -191,7 +191,7 @@ void Poly1305::final_result(byte out[])
{
m_buf[m_buf_pos] = 1;
clear_mem(&m_buf[m_buf_pos+1], m_buf.size() - m_buf_pos - 1);
- poly1305_blocks(m_poly, &m_buf[0], 1, true);
+ poly1305_blocks(m_poly, m_buf.data(), 1, true);
}
poly1305_finish(m_poly, out);