I tried to keep signature block as similar as of _javascript_ so that processing except for starting and ending lines are same.
Reason for using multi-line comment is simple processing. In case of single line comment, we will have to remove comment character from each line to process, while in multi-line comment, that is not required.
3- In Extract_Sign_Cert_Content there are a few code review ideas I had, would you like me to detail them?
Yes, I would like review details. I would like to mention that methods need to be called in same order: sign, cert and content.
content method can handle if it is called independently.
Here are a couple of tests to consider:
1- effects of newline characters. Especially if signature is created on
one platform and verified on another. I note that you are using readLine
in the code, so there is the possibility there of issues.
I will test with slow streams.
I note that you are using ready to determine end of input, but that may
not do what you expect. What if the input is a StringReader for
example?
I did not understand this completely. What I can understand, I would not be able to perform readLine with StringReader. So we can convert StringReader to BufferedReader.