Skip to content

Commit

Permalink
Refactor old_faster_hash()
Browse files Browse the repository at this point in the history
Signed-off-by: Richard T Bonhomme <[email protected]>
  • Loading branch information
TinCanTech committed Feb 24, 2022
1 parent 747094d commit 90e10a3
Showing 1 changed file with 20 additions and 15 deletions.
35 changes: 20 additions & 15 deletions easytls
Original file line number Diff line number Diff line change
Expand Up @@ -9073,27 +9073,32 @@ new_faster_hash ()
old_faster_hash ()
{
# Generate a single hash of all the files via cat
generated_faster_hash="$(
{
set --
IFS="${new_line}"
old_IFS="$IFS"
IFS="${new_line}"
set --

# List inline files
for f in ${inline_file_list}; do set -- "$@" "${f}"; done
# List inline files
for f in ${inline_file_list}; do set -- "$@" "${f}"; done

# List tlskey files
for f in ${tlskey_file_list}; do set -- "$@" "${f}"; done
# List tlskey files
for f in ${tlskey_file_list}; do set -- "$@" "${f}"; done

# List utility files
for f in ${util_file_list}; do set -- "$@" "${f}"; done
# List utility files
for f in ${util_file_list}; do set -- "$@" "${f}"; done

# cat the list
"${EASYTLS_CAT}" "$@" || \
die "generate_master_hash - # cat the list"
# cat the list
# pipe to SSL
cat_list_hash="$(
"${EASYTLS_CAT}" "$@" | ssl_generate_old_master_data_hash
)" || \
die "generate_master_hash - generated_faster_hash"

} | ssl_generate_old_master_data_hash
# Use hash
generated_faster_hash="${cat_list_hash}"

)" || die "generate_master_hash - generated_faster_hash"
set --
IFS="${old_IFS}"
unset old_IFS cat_list_hash
} # => old_faster_hash ()

# Save Master hash
Expand Down

1 comment on commit 90e10a3

@TinCanTech
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.