summaryrefslogtreecommitdiff
path: root/sha.cpp
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2009-03-12 11:24:12 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2009-03-12 11:24:12 +0000
commita36c71ecb6840ff799546ccaf665e55f6a6ed5dc (patch)
tree68edc0bccf003f5615716b3ae2d6b97067af39c4 /sha.cpp
parentce1fbfcba325116155a605b8519bc0b4e272348f (diff)
downloadcryptopp-a36c71ecb6840ff799546ccaf665e55f6a6ed5dc.tar.gz
- add EAX mode, XSalsa20
- speed up GCM key setup - wipe stack in AES assembly code - speed up CFB mode git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@444 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'sha.cpp')
-rw-r--r--sha.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/sha.cpp b/sha.cpp
index 905d12d..945ad39 100644
--- a/sha.cpp
+++ b/sha.cpp
@@ -100,7 +100,11 @@ void SHA256::InitState(HashWordType *state)
memcpy(state, s, sizeof(s));
}
+#if CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE
+CRYPTOPP_ALIGN_DATA(16) extern const word32 SHA256_K[64] CRYPTOPP_SECTION_ALIGN16 = {
+#else
extern const word32 SHA256_K[64] = {
+#endif
0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,
0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
@@ -426,7 +430,7 @@ void CRYPTOPP_FASTCALL X86_SHA256_HashBlocks(word32 *state, const word32 *data,
}
#endif
-#if CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE || defined(CRYPTOPP_X64_MASM_AVAILABLE)
+#if defined(CRYPTOPP_X86_ASM_AVAILABLE) || defined(CRYPTOPP_X64_MASM_AVAILABLE)
size_t SHA256::HashMultipleBlocks(const word32 *input, size_t length)
{