Before

…lines 1–339 unchanged (339 lines)
340 hash_state md;
341
342 for (i = 0; tests[i].msg != NULL; i++) {
343 md5_init(&md);
344 md5_process(&md, (unsigned char *)tests[i].msg, (unsigned long)XSTRLEN(tests[i].msg));
345 md5_done(&md, tmp);
346 if (compare_testvector(tmp, sizeof(tmp), tests[i].hash, sizeof(tests[i].hash), "MD5", i)) {
347 return CRYPT_FAIL_TESTVECTOR;
348 }
349 }
350 return CRYPT_OK;
351 #endif
352}
…lines 353–364 unchanged (12 lines)

After

…lines 1–339 unchanged (339 lines)
340 hash_state md;
341
342 for (i = 0; tests[i].msg != NULL; i++) {
343 md5_init(&md);
344 md5_process(&md, (unsigned char *)tests[i].msg, (unsigned long)XSTRLEN(tests[i].msg));
345 md5_done(&md, tmp);
346 if (ltc_compare_testvector(tmp, sizeof(tmp), tests[i].hash, sizeof(tests[i].hash), "MD5", i)) {
347 return CRYPT_FAIL_TESTVECTOR;
348 }
349 }
350 return CRYPT_OK;
351 #endif
352}
…lines 353–364 unchanged (12 lines)

Before

translation_unit
comment "/* LibTomCrypt, modular cryptographic library -- Tom St Deni"...
comment "/* SPDX-License-Identifier: Unlicense */"
preproc_include
#include "#include"
string_literal
" "\""
string_content "tomcrypt_private.h"
" "\""
comment "/**\n @file md5.c\n LTC_MD5 hash function by Tom St Denis\n*/"
preproc_ifdef
#ifdef "#ifdef"
identifier "LTC_MD5"
declaration (+61 nodes collapsed)
preproc_function_def
#define "#define"
identifier "F"
preproc_params
( "("
identifier "x"
, ","
identifier "y"
, ","
identifier "z"
) ")"
preproc_arg "(z ^ (x & (y ^ z)))"
preproc_function_def
#define "#define"
identifier "G"
preproc_params
( "("
identifier "x"
, ","
identifier "y"
, ","
identifier "z"
) ")"
preproc_arg "(y ^ (z & (y ^ x)))"
preproc_function_def
#define "#define"
identifier "H"
preproc_params
( "("
identifier "x"
, ","
identifier "y"
, ","
identifier "z"
) ")"
preproc_arg "(x^y^z)"
preproc_function_def
#define "#define"
identifier "I"
preproc_params
( "("
identifier "x"
, ","
identifier "y"
, ","
identifier "z"
) ")"
preproc_arg "(y^(x|(~z)))"
preproc_ifdef (+602 nodes collapsed)
preproc_ifdef
#ifdef "#ifdef"
identifier "LTC_CLEAN_STACK"
declaration (+25 nodes collapsed)
preproc_else
#else "#else"
function_definition (+2158 nodes collapsed)
preproc_ifdef (+68 nodes collapsed)
comment "/**\n Initialize the hash state\n @param md The hash sta"...
function_definition (+119 nodes collapsed)
comment "/**\n Process a block of memory though the hash\n @param m"...
expression_statement
call_expression
identifier "HASH_PROCESS"
argument_list
( "("
identifier "md5_process"
, ","
identifier "s_md5_compress"
, ","
identifier "md5"
, ","
number_literal "64"
) ")"
comment "/**\n Terminate the hash to get the digest\n @param md Th"...
; ""
function_definition (+399 nodes collapsed)
comment "/**\n Self-test the hash\n @return CRYPT_OK if successful, C"...
function_definition
primitive_type "int"
function_declarator
identifier "md5_test"
parameter_list
( "("
parameter_declaration
primitive_type "void"
) ")"
compound_statement
{ "{"
preproc_ifdef
#ifndef "#ifndef"
identifier "LTC_TEST"
return_statement
return "return"
identifier "CRYPT_NOP"
; ";"
preproc_else
#else "#else"
declaration (+348 nodes collapsed)
declaration
primitive_type "int"
identifier "i"
; ";"
declaration
sized_type_specifier
unsigned "unsigned"
primitive_type "char"
array_declarator
identifier "tmp"
[ "["
number_literal "16"
] "]"
; ";"
declaration
type_identifier "hash_state"
identifier "md"
; ";"
for_statement
for "for"
( "("
assignment_expression
identifier "i"
= "="
number_literal "0"
; ";"
binary_expression
field_expression
subscript_expression
identifier "tests"
[ "["
identifier "i"
] "]"
. "."
field_identifier "msg"
!= "!="
null
NULL "NULL"
; ";"
update_expression
identifier "i"
++ "++"
) ")"
compound_statement
{ "{"
expression_statement
call_expression
identifier "md5_init"
argument_list
( "("
pointer_expression
& "&"
identifier "md"
) ")"
; ";"
expression_statement (+49 nodes collapsed)
expression_statement
call_expression
identifier "md5_done"
argument_list
( "("
pointer_expression
& "&"
identifier "md"
, ","
identifier "tmp"
) ")"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
call_expression
identifier "compare_testvector"
argument_list (+41 nodes collapsed)
) ")"
compound_statement
{ "{"
return_statement
return "return"
identifier "CRYPT_FAIL_TESTVECTOR"
; ";"
} "}"
} "}"
return_statement
return "return"
identifier "CRYPT_OK"
; ";"
#endif "#endif"
} "}"
preproc_call
preproc_directive "#undef"
preproc_arg "F"
preproc_call
preproc_directive "#undef"
preproc_arg "G"
preproc_call
preproc_directive "#undef"
preproc_arg "H"
preproc_call
preproc_directive "#undef"
preproc_arg "I"
preproc_call
preproc_directive "#undef"
preproc_arg "FF"
preproc_call
preproc_directive "#undef"
preproc_arg "GG"
preproc_call
preproc_directive "#undef"
preproc_arg "HH"
preproc_call
preproc_directive "#undef"
preproc_arg "II"
#endif "#endif"
#endif ""

After

translation_unit
comment "/* LibTomCrypt, modular cryptographic library -- Tom St Deni"...
comment "/* SPDX-License-Identifier: Unlicense */"
preproc_include
#include "#include"
string_literal
" "\""
string_content "tomcrypt_private.h"
" "\""
comment "/**\n @file md5.c\n LTC_MD5 hash function by Tom St Denis\n*/"
preproc_ifdef
#ifdef "#ifdef"
identifier "LTC_MD5"
declaration (+61 nodes collapsed)
preproc_function_def
#define "#define"
identifier "F"
preproc_params
( "("
identifier "x"
, ","
identifier "y"
, ","
identifier "z"
) ")"
preproc_arg "(z ^ (x & (y ^ z)))"
preproc_function_def
#define "#define"
identifier "G"
preproc_params
( "("
identifier "x"
, ","
identifier "y"
, ","
identifier "z"
) ")"
preproc_arg "(y ^ (z & (y ^ x)))"
preproc_function_def
#define "#define"
identifier "H"
preproc_params
( "("
identifier "x"
, ","
identifier "y"
, ","
identifier "z"
) ")"
preproc_arg "(x^y^z)"
preproc_function_def
#define "#define"
identifier "I"
preproc_params
( "("
identifier "x"
, ","
identifier "y"
, ","
identifier "z"
) ")"
preproc_arg "(y^(x|(~z)))"
preproc_ifdef (+602 nodes collapsed)
preproc_ifdef
#ifdef "#ifdef"
identifier "LTC_CLEAN_STACK"
declaration (+25 nodes collapsed)
preproc_else
#else "#else"
function_definition (+2158 nodes collapsed)
preproc_ifdef (+68 nodes collapsed)
comment "/**\n Initialize the hash state\n @param md The hash sta"...
function_definition (+119 nodes collapsed)
comment "/**\n Process a block of memory though the hash\n @param m"...
expression_statement
call_expression
identifier "HASH_PROCESS"
argument_list
( "("
identifier "md5_process"
, ","
identifier "s_md5_compress"
, ","
identifier "md5"
, ","
number_literal "64"
) ")"
comment "/**\n Terminate the hash to get the digest\n @param md Th"...
; ""
function_definition (+399 nodes collapsed)
comment "/**\n Self-test the hash\n @return CRYPT_OK if successful, C"...
function_definition
primitive_type "int"
function_declarator
identifier "md5_test"
parameter_list
( "("
parameter_declaration
primitive_type "void"
) ")"
compound_statement
{ "{"
preproc_ifdef
#ifndef "#ifndef"
identifier "LTC_TEST"
return_statement
return "return"
identifier "CRYPT_NOP"
; ";"
preproc_else
#else "#else"
declaration (+348 nodes collapsed)
declaration
primitive_type "int"
identifier "i"
; ";"
declaration
sized_type_specifier
unsigned "unsigned"
primitive_type "char"
array_declarator
identifier "tmp"
[ "["
number_literal "16"
] "]"
; ";"
declaration
type_identifier "hash_state"
identifier "md"
; ";"
for_statement
for "for"
( "("
assignment_expression
identifier "i"
= "="
number_literal "0"
; ";"
binary_expression
field_expression
subscript_expression
identifier "tests"
[ "["
identifier "i"
] "]"
. "."
field_identifier "msg"
!= "!="
null
NULL "NULL"
; ";"
update_expression
identifier "i"
++ "++"
) ")"
compound_statement
{ "{"
expression_statement
call_expression
identifier "md5_init"
argument_list
( "("
pointer_expression
& "&"
identifier "md"
) ")"
; ";"
expression_statement (+49 nodes collapsed)
expression_statement
call_expression
identifier "md5_done"
argument_list
( "("
pointer_expression
& "&"
identifier "md"
, ","
identifier "tmp"
) ")"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
call_expression
identifier "ltc_compare_testvector"
argument_list (+41 nodes collapsed)
) ")"
compound_statement
{ "{"
return_statement
return "return"
identifier "CRYPT_FAIL_TESTVECTOR"
; ";"
} "}"
} "}"
return_statement
return "return"
identifier "CRYPT_OK"
; ";"
#endif "#endif"
} "}"
preproc_call
preproc_directive "#undef"
preproc_arg "F"
preproc_call
preproc_directive "#undef"
preproc_arg "G"
preproc_call
preproc_directive "#undef"
preproc_arg "H"
preproc_call
preproc_directive "#undef"
preproc_arg "I"
preproc_call
preproc_directive "#undef"
preproc_arg "FF"
preproc_call
preproc_directive "#undef"
preproc_arg "GG"
preproc_call
preproc_directive "#undef"
preproc_arg "HH"
preproc_call
preproc_directive "#undef"
preproc_arg "II"
#endif "#endif"
#endif ""