Method: Base64.urlsafe_encode64

Defined in:
lib/base64.rb

.urlsafe_encode64(bin) ⇒ Object

Returns the Base64-encoded version of bin. This method complies with “Base 64 Encoding with URL and Filename Safe Alphabet” in RFC 4648. The alphabet uses ‘-’ instead of ‘+’ and ‘_’ instead of ‘/’.



80
81
82
# File 'lib/base64.rb', line 80

def urlsafe_encode64(bin)
  strict_encode64(bin).tr("+/", "-_")
end