Ruby Base64.decode64()

Decode an input String using Base64.

Function

Base64.decode64(str)

Parameters

str - The String to be decoded

Return value

Returns the Base64-decoded version of str. This method complies with RFC 2045. Characters outside the base alphabet are ignored.

Example

require "base64"

encoded_string = 'YmFzZTY0IGVuY29kZWQgc3RyaW5n'
decoded_string = Base64.decode64(encoded_string)

Github

See also: