@@ -166,6 +166,9 @@ class algorithm
166166 template <typename xWord, if_extended<xWord> = true >
167167 using wstate_t = std_array<xWord, sizeof (state_t ) / sizeof (xWord)>;
168168
169+ // //template <typename xWord, if_extended<xWord> = true>
170+ // //using wblock_t = std_array<xWord, sizeof(block_t) / sizeof(xWord)>;
171+
169172 // / Other types.
170173 // / -----------------------------------------------------------------------
171174
@@ -236,17 +239,23 @@ class algorithm
236239 // / Padding.
237240 // / -----------------------------------------------------------------------
238241
242+ // / Scheduled padding (new and existing buffer objects).
239243 template <size_t Blocks>
240244 static CONSTEVAL buffer_t scheduled_pad () NOEXCEPT;
241- static CONSTEVAL chunk_t chunk_pad () NOEXCEPT;
242- static CONSTEVAL pad_t stream_pad () NOEXCEPT;
243-
244245 template <size_t Blocks>
245246 static constexpr void schedule_n (buffer_t & buffer) NOEXCEPT;
246247 static constexpr void schedule_n (buffer_t & buffer, size_t blocks) NOEXCEPT;
247248 static constexpr void schedule_1 (buffer_t & buffer) NOEXCEPT;
248- static constexpr void pad_half (buffer_t & buffer) NOEXCEPT;
249- static constexpr void pad_n (buffer_t & buffer, count_t blocks) NOEXCEPT;
249+
250+ // / Unscheduled padding (new objects).
251+ static words_t pad_block () NOEXCEPT;
252+ static words_t pad_blocks (count_t blocks) NOEXCEPT;
253+ static CONSTEVAL chunk_t chunk_pad () NOEXCEPT;
254+ static CONSTEVAL pad_t stream_pad () NOEXCEPT;
255+
256+ // / Unscheduled padding (update block or buffer object).
257+ static constexpr void pad_half (auto & buffer) NOEXCEPT;
258+ static constexpr void pad_n (auto & buffer, count_t blocks) NOEXCEPT;
250259
251260 // / Double hashing.
252261 // / -----------------------------------------------------------------------
@@ -363,6 +372,8 @@ class algorithm
363372 // / Native SHA optimizations (single blocks).
364373 // / -----------------------------------------------------------------------
365374
375+ template <bool Swap>
376+ INLINE static xint128_t bytes (xint128_t message) NOEXCEPT;
366377 INLINE static void shuffle (xint128_t & state0, xint128_t & state1) NOEXCEPT;
367378 INLINE static void unshuffle (xint128_t & state0, xint128_t & state1) NOEXCEPT;
368379 INLINE static void prepare (xint128_t & message0, xint128_t message1) NOEXCEPT;
@@ -373,7 +384,14 @@ class algorithm
373384 INLINE static void round_4 (xint128_t & state0, xint128_t & state1,
374385 xint128_t message) NOEXCEPT;
375386
376- static void native_rounds (state_t & state, iblocks_t & blocks) NOEXCEPT;
387+ template <bool Swap>
388+ INLINE static void native_rounds (xint128_t & lo, xint128_t & hi,
389+ const block_t & block) NOEXCEPT;
390+
391+ static void native_ (state_t & state, iblocks_t & blocks) NOEXCEPT;
392+ static void native_ (state_t & state, const block_t & block) NOEXCEPT;
393+ INLINE static void native_preswapped (state_t & state,
394+ const words_t & block) NOEXCEPT;
377395
378396public:
379397 // / Summary public values.
0 commit comments