change hascode to sha256 default, make hashfunction configurable, +refactoring, fix typo in error message
change hascode to sha256 default, make hashfunction configurable, +refactoring, fix typo in error message

sematext/logagent-js,sematext/logagent-js