diff options
author | Simon Warta <[email protected]> | 2015-06-23 18:54:36 +0200 |
---|---|---|
committer | Simon Warta <[email protected]> | 2015-06-23 18:54:36 +0200 |
commit | 9a841344acb1844082a0e46c26f91b4f50af86dd (patch) | |
tree | 3bad0843eaaa50ff2f6869a3c886a65493391946 /src/lib/stream/salsa20 | |
parent | e4cfc6684df02e1c1c2b583c764514cfc08e9c39 (diff) |
lib/stream: Convert &vec[0] to vec.data()
Diffstat (limited to 'src/lib/stream/salsa20')
-rw-r--r-- | src/lib/stream/salsa20/salsa20.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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<u32bit>(iv, 3); secure_vector<u32bit> 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); |