Module: Base64

Defined in:
lib/stormmq/base64_extensions.rb

Overview

– Copyright © 2010, Tony Byrne & StormMQ Ltd. All rights reserved.

Please refer to the LICENSE file that accompanies this source for terms of use and redistribution. ++

Instance Method Summary collapse

Instance Method Details

#urlsafe_decode64(str) ⇒ Object



11
12
13
# File 'lib/stormmq/base64_extensions.rb', line 11

def urlsafe_decode64(str)
  decode64(str.tr("-_", "+/"))
end

#urlsafe_encode64(bin) ⇒ Object



15
16
17
# File 'lib/stormmq/base64_extensions.rb', line 15

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