File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -335,6 +335,13 @@ ChaCha20::~ChaCha20()
335
335
memory_cleanse (m_buffer.data (), m_buffer.size ());
336
336
}
337
337
338
+ void ChaCha20::SetKey (Span<const std::byte> key) noexcept
339
+ {
340
+ m_aligned.SetKey (key);
341
+ m_bufleft = 0 ;
342
+ memory_cleanse (m_buffer.data (), m_buffer.size ());
343
+ }
344
+
338
345
FSChaCha20::FSChaCha20 (Span<const std::byte> key, uint32_t rekey_interval) noexcept :
339
346
m_chacha20(key), m_rekey_interval(rekey_interval)
340
347
{
Original file line number Diff line number Diff line change @@ -95,11 +95,7 @@ class ChaCha20
95
95
~ChaCha20 ();
96
96
97
97
/* * Set 32-byte key, and seek to nonce 0 and block position 0. */
98
- void SetKey (Span<const std::byte> key) noexcept
99
- {
100
- m_aligned.SetKey (key);
101
- m_bufleft = 0 ;
102
- }
98
+ void SetKey (Span<const std::byte> key) noexcept ;
103
99
104
100
/* * 96-bit nonce type. */
105
101
using Nonce96 = ChaCha20Aligned::Nonce96;
You can’t perform that action at this time.
0 commit comments