replace std::string in FromBase64 with std::vector<char>
replace std::string in ToBase64 with std::vector<char>
avoid vector indexing if binary size is 0
avoid vector indexing if binary size is 0
fix a bug and an exception