What separator should I use (SHA256) [closed]

I'm saving a log file in with each line corresponds to a log entry.

For integrity reason I'm adding at the end of each line a SHA256 hash of the previous line.

What is the best separator to use string to separate the log entry from the hash?

closed as off-topic by e-sushiSep 20 '16 at 13:19

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "Programming questions are off-topic even if you are writing or debugging cryptographic code. Unless your question is specifically about how the cryptographic algorithm or protocol works, you should look into asking on Stack Overflow instead." – e-sushi
If this question can be reworded to fit the rules in the help center, please edit the question.

• Note that a hash such as SHA-256 only protects against non-malicious changes. To protect it against malicious changes you'd need a MAC or signature. – Maarten Bodewes Sep 20 '16 at 11:09

So use a space (_), or a | or even _|_ for some nice whitespace to keep things readable. You need to look for the separator or hash string starting at the end though, e.g. using a regular expression or some lastIndexOf function. Make sure you raise a warning or error if the hash value has not been set, it could have been stripped off.