I have written a script which stores digital signatures in binaries and script files. This question is only regarding scripts: Currently, all these signatures get stored in one single line (a comment) such as:
#!/usr/bin/perl
print "Hello"
print " World\n"
#Signature:ASDASG13412sdflsal4sf etc........
The example is Perl, but this is done for all scripting languages (Perl, Python, shell scripts etc.) So now my question is: Can I get into trouble if the length of the line containing the signature is too long? How do interpreter handle this? If so, what is the max. line length I can use?
Most scripting languages will have long enough limits, if indeed they have a formal limit on the length of lines. POSIX recommends 2048 minimum.
How long are your signatures? Most likely, not more than 1024...in which case, I really wouldn't worry. If it doesn't work for some language, you should report the bug rather than anything else.
Perl also has no fixed maximum line length, other than imposed by memory usage.
In Python, you should not have any problem with line length as long as you have sufficient memory. In PHP, you may be limited by the amount of memory PHP interpreter is allowed to use (set in php.ini)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With