Skip to content

Commit

Permalink
md5_block_data_order
Browse files Browse the repository at this point in the history
  • Loading branch information
dahlstrom-g committed Jan 23, 2024
1 parent 3683570 commit eaa2f7c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions third_party/boringssl/src/crypto/fipsmodule/md5/md5.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,13 @@ int MD5_Init(MD5_CTX *md5) {
return 1;
}

#if !defined(OPENSSL_NO_ASM) && \
(defined(OPENSSL_X86_64) || defined(OPENSSL_X86))
#define MD5_ASM
#if defined(MD5_ASM)
#define md5_block_data_order md5_block_asm_data_order
#else
static void md5_block_data_order(uint32_t *state, const uint8_t *data,
size_t num);
#endif

void md5_block_data_order(uint32_t *state, const uint8_t *data, size_t num);

void MD5_Transform(MD5_CTX *c, const uint8_t data[MD5_CBLOCK]) {
md5_block_data_order(c->h, data, 1);
}
Expand Down Expand Up @@ -150,11 +149,12 @@ int MD5_Final(uint8_t out[MD5_DIGEST_LENGTH], MD5_CTX *c) {
(a) += (b); \
} while (0)

#ifndef md5_block_data_order
#ifndef MD5_ASM
#ifdef X
#undef X
#endif
void md5_block_data_order(uint32_t *state, const uint8_t *data, size_t num) {
static void md5_block_data_order(uint32_t *state, const uint8_t *data,
size_t num) {
uint32_t A, B, C, D;
uint32_t XX0, XX1, XX2, XX3, XX4, XX5, XX6, XX7, XX8, XX9, XX10, XX11, XX12,
XX13, XX14, XX15;
Expand Down

0 comments on commit eaa2f7c

Please sign in to comment.