Change crypto functions to base64