There is a nice question about hashing/strings/encoding etc, which I hastily answered but now the answer is deleted and I'd appreciate an informative answer :)
https://mathematica.stackexchange.com/q/160589/5478
The issue that prompt me to delete my answer was a realization that I had a wrong idea of how to generate list of bytes:
Import[Export["temp.txt", FromCharacterCode[Range[0, 2^16 - 1]]], "Binary"]
without exporting and importing file.
@Szabolcs @halirutan and others, any help?