improve correctness and code clarity of {Hex,Base64}{En,De}coder
restrict output pointers to aid compiler optimizations