So, you are going to have line breaks in there. Then you need to strip them out before doing any comparison. But there is still a problem if you supply a text that is larger than 256 and 'hello' is the last of one read and 'world' is the first of the next.