Encode an input String using Base64.
Base64.encode64(bin)
bin - The String to be encoded
Returns the Base64-encoded version of bin. This method complies with RFC 2045. Line feeds are added to every 60 encoded charactors.
require "base64"
string = 'base64 string'
encoded_string = Base64.encode64(string)