http://sakhnik.blogspot.com/2007/04/base64-transformations-in-c.html