Refactoring client js code, make base classes for hash algorithms, for block cipher, and change web socket mode to arraybuffer