Print consecutive spaces faster#1940
Merged
drwetter merged 1 commit intotestssl:3.1devfrom Jul 30, 2021
Merged
Conversation
This commit adds a new function, print_n_spaces(), which prints a sequence of (up to 80) space characters. This new function is used to replace a few places in testssl.sh in which a sequence of space characters is printed by calling 'out " "' in a loop. The new function is much faster than the current code, so it will make testssl.sh run slightly faster.
Collaborator
|
Thanks, David! |
dcooper16
pushed a commit
to dcooper16/testssl.sh
that referenced
this pull request
Nov 7, 2022
This commit simplifies the adding of padding data in a few places. Rather than adding one or two bytes at a time in a "for" loop, all of the padding is added in one step by extracting it from a long padding string. (The one exception is in run_robot(), where a "for" loop is used to add additional padding in case in which the RSA modulus is longer than the pre-defined padding string.) Extracting the padding from a long string is faster than using a "for" loop and it makes the debugging file a little cleaner. The idea is the same as PR testssl#1940.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a new function,
print_n_spaces(), which prints a sequence of (up to 80) space characters.This new function is used to replace a few places in testssl.sh in which a sequence of space characters is printed by calling
out " "in a loop. The new function is much faster than the current code, so it will make testssl.sh run slightly faster.