diff options
Diffstat (limited to 'src/lib/libcrypto/md32_common.h')
-rw-r--r-- | src/lib/libcrypto/md32_common.h | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/lib/libcrypto/md32_common.h b/src/lib/libcrypto/md32_common.h index a8b0d9ab74..cce4cfb0f7 100644 --- a/src/lib/libcrypto/md32_common.h +++ b/src/lib/libcrypto/md32_common.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: md32_common.h,v 1.23 2022/12/26 07:18:50 jmc Exp $ */ | 1 | /* $OpenBSD: md32_common.h,v 1.24 2023/04/12 04:54:15 jsing Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved. |
4 | * | 4 | * |
@@ -111,6 +111,8 @@ | |||
111 | 111 | ||
112 | #include <openssl/opensslconf.h> | 112 | #include <openssl/opensslconf.h> |
113 | 113 | ||
114 | #include "crypto_internal.h" | ||
115 | |||
114 | #if !defined(DATA_ORDER_IS_BIG_ENDIAN) && !defined(DATA_ORDER_IS_LITTLE_ENDIAN) | 116 | #if !defined(DATA_ORDER_IS_BIG_ENDIAN) && !defined(DATA_ORDER_IS_LITTLE_ENDIAN) |
115 | #error "DATA_ORDER must be defined!" | 117 | #error "DATA_ORDER must be defined!" |
116 | #endif | 118 | #endif |
@@ -139,15 +141,7 @@ | |||
139 | #error "HASH_BLOCK_DATA_ORDER must be defined!" | 141 | #error "HASH_BLOCK_DATA_ORDER must be defined!" |
140 | #endif | 142 | #endif |
141 | 143 | ||
142 | /* | 144 | #define ROTATE(a, n) crypto_rol_u32(a, n) |
143 | * This common idiom is recognized by the compiler and turned into a | ||
144 | * CPU-specific intrinsic as appropriate. | ||
145 | * e.g. GCC optimizes to roll on amd64 at -O0 | ||
146 | */ | ||
147 | static inline uint32_t ROTATE(uint32_t a, uint32_t n) | ||
148 | { | ||
149 | return (a<<n)|(a>>(32-n)); | ||
150 | } | ||
151 | 145 | ||
152 | #if defined(DATA_ORDER_IS_BIG_ENDIAN) | 146 | #if defined(DATA_ORDER_IS_BIG_ENDIAN) |
153 | 147 | ||