module Roda::RodaPlugins::Base64_

  1. lib/roda/plugins/_base64.rb

Public Class methods

decode64(str)
[show source]
   # File lib/roda/plugins/_base64.rb
 9 def decode64(str)
10   str.unpack1("m0")
11 end
urlsafe_decode64(str)
[show source]
   # File lib/roda/plugins/_base64.rb
26 def urlsafe_decode64(str)
27   decode64(str.tr("-_", "+/"))
28 end
urlsafe_encode64(bin)
[show source]
   # File lib/roda/plugins/_base64.rb
20 def urlsafe_encode64(bin)
21   str = [bin].pack("m0")
22   str.tr!("+/", "-_")
23   str
24 end