base 64 codec encode reimpl