diff options
author | unknown <msvensson@pilot.blaudden> | 2007-03-23 11:52:25 +0100 |
---|---|---|
committer | unknown <msvensson@pilot.blaudden> | 2007-03-23 11:52:25 +0100 |
commit | 45f2f76457a39977cbe0026f3ae281aa726c6c67 (patch) | |
tree | f9517527bb2572466e747c9a5726360dc8db1607 /extra/yassl/taocrypt/include/misc.hpp | |
parent | 2176fef44694e7980c39c536640a62b87517994d (diff) | |
download | mariadb-git-45f2f76457a39977cbe0026f3ae281aa726c6c67.tar.gz |
Import yassl 1.6.0
extra/yassl/README:
Import patch yassl.diff
extra/yassl/include/buffer.hpp:
Import patch yassl.diff
extra/yassl/include/crypto_wrapper.hpp:
Import patch yassl.diff
extra/yassl/include/openssl/ssl.h:
Import patch yassl.diff
extra/yassl/include/socket_wrapper.hpp:
Import patch yassl.diff
extra/yassl/include/yassl_imp.hpp:
Import patch yassl.diff
extra/yassl/include/yassl_int.hpp:
Import patch yassl.diff
extra/yassl/src/crypto_wrapper.cpp:
Import patch yassl.diff
extra/yassl/src/ssl.cpp:
Import patch yassl.diff
extra/yassl/taocrypt/README:
Import patch yassl.diff
extra/yassl/taocrypt/benchmark/benchmark.cpp:
Import patch yassl.diff
extra/yassl/taocrypt/include/algebra.hpp:
Import patch yassl.diff
extra/yassl/taocrypt/include/des.hpp:
Import patch yassl.diff
extra/yassl/taocrypt/include/hash.hpp:
Import patch yassl.diff
extra/yassl/taocrypt/include/hmac.hpp:
Import patch yassl.diff
extra/yassl/taocrypt/include/misc.hpp:
Import patch yassl.diff
extra/yassl/taocrypt/include/modarith.hpp:
Import patch yassl.diff
extra/yassl/taocrypt/include/modes.hpp:
Import patch yassl.diff
extra/yassl/taocrypt/include/rsa.hpp:
Import patch yassl.diff
extra/yassl/taocrypt/include/sha.hpp:
Import patch yassl.diff
extra/yassl/taocrypt/include/type_traits.hpp:
Import patch yassl.diff
extra/yassl/taocrypt/include/types.hpp:
Import patch yassl.diff
extra/yassl/taocrypt/mySTL/list.hpp:
Import patch yassl.diff
extra/yassl/taocrypt/src/aes.cpp:
Import patch yassl.diff
extra/yassl/taocrypt/src/algebra.cpp:
Import patch yassl.diff
extra/yassl/taocrypt/src/asn.cpp:
Import patch yassl.diff
extra/yassl/taocrypt/src/hash.cpp:
Import patch yassl.diff
extra/yassl/taocrypt/src/integer.cpp:
Import patch yassl.diff
extra/yassl/taocrypt/src/sha.cpp:
Import patch yassl.diff
extra/yassl/taocrypt/test/test.cpp:
Import patch yassl.diff
extra/yassl/testsuite/testsuite.cpp:
Import patch yassl.diff
Diffstat (limited to 'extra/yassl/taocrypt/include/misc.hpp')
-rw-r--r-- | extra/yassl/taocrypt/include/misc.hpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/extra/yassl/taocrypt/include/misc.hpp b/extra/yassl/taocrypt/include/misc.hpp index 224589e0640..96648a39aa1 100644 --- a/extra/yassl/taocrypt/include/misc.hpp +++ b/extra/yassl/taocrypt/include/misc.hpp @@ -464,6 +464,25 @@ inline word32 ByteReverse(word32 value) } +#ifdef WORD64_AVAILABLE + +inline word64 ByteReverse(word64 value) +{ +#ifdef TAOCRYPT_SLOW_WORD64 + return (word64(ByteReverse(word32(value))) << 32) | + ByteReverse(word32(value>>32)); +#else + value = ((value & W64LIT(0xFF00FF00FF00FF00)) >> 8) | + ((value & W64LIT(0x00FF00FF00FF00FF)) << 8); + value = ((value & W64LIT(0xFFFF0000FFFF0000)) >> 16) | + ((value & W64LIT(0x0000FFFF0000FFFF)) << 16); + return rotlFixed(value, 32U); +#endif +} + +#endif // WORD64_AVAILABLE + + template <typename T> inline void ByteReverse(T* out, const T* in, word32 byteCount) { |