Changeset 85623 in vbox for trunk/src/VBox/Runtime/common/checksum
- Timestamp:
- Aug 5, 2020 8:49:27 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/checksum/openssl-sha3.cpp
r85618 r85623 27 27 #if 1 /* For now: */ 28 28 # include "alt-sha3.cpp" 29 29 30 #else 30 31 … … 34 35 *********************************************************************************************************************************/ 35 36 #include "internal/iprt.h" 37 #include <iprt/assert.h> 38 #include <iprt/err.h> 39 #include <iprt/string.h> 36 40 37 41 #include "internal/openssl-pre.h" 38 42 #include <openssl/evp.h> 39 43 #include "internal/openssl-post.h" 40 41 42 /* Internal EVP structure that we fake here to avoid lots of casting. */43 struct evp_md_ctx_st44 {45 void *apvWhatever[10];46 };47 48 /** The OpenSSL private context structure. */49 typedef struct RTSHA3PRIVATECTX50 {51 /** RTSHA3PRIVATECTX_MAGIC / RTSHA3PRIVATECTX_MAGIC_FINAL / RTSHA3PRIVATECTX_MAGIC_DEAD */52 uint64_t u64Magic;53 /** The OpenSSL context. We cheat to avoid EVP_MD_CTX_new/free. */54 struct evp_md_ctx_st MdCtx;55 } RTSHA3PRIVATECTX;56 57 #define RT_SHA3_PRIVATE_CONTEXT58 #include <iprt/sha.h>59 AssertCompile(RT_SIZEOFMEMB(RTSHA3CONTEXT, abPadding) >= RT_SIZEOFMEMB(RTSHA3CONTEXT, Private));60 61 #include <iprt/assert.h>62 #include <iprt/err.h>63 #include <iprt/string.h>64 44 65 45 … … 70 50 #define RTSHA3PRIVATECTX_MAGIC_FINAL UINT64_C(0x40890fe0e474215d) 71 51 #define RTSHA3PRIVATECTX_MAGIC_DEAD UINT64_C(0xdead7a05081cbeef) 52 53 54 /********************************************************************************************************************************* 55 * Structures and Typedefs * 56 *********************************************************************************************************************************/ 57 /* Internal EVP structure that we fake here to avoid lots of casting. */ 58 struct evp_md_ctx_st 59 { 60 void *apvWhatever[10]; 61 }; 62 63 /** The OpenSSL private context structure. */ 64 typedef struct RTSHA3PRIVATECTX 65 { 66 /** RTSHA3PRIVATECTX_MAGIC / RTSHA3PRIVATECTX_MAGIC_FINAL / RTSHA3PRIVATECTX_MAGIC_DEAD */ 67 uint64_t u64Magic; 68 /** The OpenSSL context. We cheat to avoid EVP_MD_CTX_new/free. */ 69 struct evp_md_ctx_st MdCtx; 70 } RTSHA3PRIVATECTX; 71 72 #define RT_SHA3_PRIVATE_CONTEXT 73 #include <iprt/sha.h> 74 AssertCompile(RT_SIZEOFMEMB(RTSHA3CONTEXT, abPadding) >= RT_SIZEOFMEMB(RTSHA3CONTEXT, Private)); 75 72 76 73 77
Note:
See TracChangeset
for help on using the changeset viewer.