diff --git a/testssl.sh b/testssl.sh index 39cd578..4c68c6a 100755 --- a/testssl.sh +++ b/testssl.sh @@ -839,6 +839,23 @@ asciihex_to_binary_file(){ return 0 } +# arg1: text string +# Output a comma-separated ASCII-HEX string resprestation of the input string. +string_to_asciihex() { + local string="$1" + local -i i eos + local output="" + + eos=${#string}-1 + for (( i=0; i