faulty base64 implementation
fix bugs for aes-gcrypt