Botan  1.11.15
Namespaces | Defines | Functions
src/lib/hash/sha1_sse2/sha1_sse2.cpp File Reference
#include <botan/internal/hash_utils.h>
#include <botan/sha1_sse2.h>
#include <botan/cpuid.h>
#include <emmintrin.h>

Go to the source code of this file.

Namespaces

namespace  Botan
namespace  Botan::SHA1_SSE2_F

Defines

#define GET_P_32(P, i)   P.u32[i]
#define prep(prep, XW0, XW1, XW2, XW3, K)
#define prep00_15(P, W)

Functions

 Botan::BOTAN_REGISTER_HASH_NOARGS_IF (CPUID::has_sse2(), SHA_160_SSE2,"SHA-160","sse2", 64)

Define Documentation

#define GET_P_32 (   P,
 
)    P.u32[i]
#define prep (   prep,
  XW0,
  XW1,
  XW2,
  XW3,
 
)

Definition at line 82 of file sha1_sse2.cpp.

#define prep00_15 (   P,
 
)
Value:
do {                                                      \
      W = _mm_shufflehi_epi16(W, _MM_SHUFFLE(2, 3, 0, 1));   \
      W = _mm_shufflelo_epi16(W, _MM_SHUFFLE(2, 3, 0, 1));   \
      W = _mm_or_si128(_mm_slli_epi16(W, 8),                 \
                       _mm_srli_epi16(W, 8));                \
      P.u128 = _mm_add_epi32(W, K00_19);                     \
   } while(0)

Definition at line 28 of file sha1_sse2.cpp.