Build able on Windows with Visual Studio 2013.
Replaced local unsigned char arrays with std::string and avoid copying.