From 9a841344acb1844082a0e46c26f91b4f50af86dd Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Tue, 23 Jun 2015 18:54:36 +0200 Subject: lib/stream: Convert &vec[0] to vec.data() --- src/lib/stream/salsa20/salsa20.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib/stream/salsa20') diff --git a/src/lib/stream/salsa20/salsa20.cpp b/src/lib/stream/salsa20/salsa20.cpp index 7ab7b4f76..daf01dd0a 100644 --- a/src/lib/stream/salsa20/salsa20.cpp +++ b/src/lib/stream/salsa20/salsa20.cpp @@ -111,7 +111,7 @@ void Salsa20::cipher(const byte in[], byte out[], size_t length) length -= (m_buffer.size() - m_position); in += (m_buffer.size() - m_position); out += (m_buffer.size() - m_position); - salsa20(&m_buffer[0], &m_state[0]); + salsa20(m_buffer.data(), m_state.data()); ++m_state[8]; m_state[9] += (m_state[8] == 0); @@ -187,7 +187,7 @@ void Salsa20::set_iv(const byte iv[], size_t length) m_state[9] = load_le(iv, 3); secure_vector hsalsa(8); - hsalsa20(&hsalsa[0], &m_state[0]); + hsalsa20(hsalsa.data(), m_state.data()); m_state[ 1] = hsalsa[0]; m_state[ 2] = hsalsa[1]; @@ -204,7 +204,7 @@ void Salsa20::set_iv(const byte iv[], size_t length) m_state[8] = 0; m_state[9] = 0; - salsa20(&m_buffer[0], &m_state[0]); + salsa20(m_buffer.data(), m_state.data()); ++m_state[8]; m_state[9] += (m_state[8] == 0); -- cgit v1.2.3