Sha256: 1f5234b680f2aa89d6cf1d3ad5a9f4abb63e8a9fccededfbb585939b71693f09
Contents?: true
Size: 383 Bytes
Versions: 11
Compression:
Stored size: 383 Bytes
Contents
Base64.class_eval do def strict_encode64(bin) encode64(bin).tr("\n",'') end def strict_decode64(str) unless str.include?("\n") decode64(str) else raise(ArgumentError,"invalid base64") end end def urlsafe_encode64(bin) strict_encode64(bin).tr("+/", "-_") end def urlsafe_decode64(str) strict_decode64(str.tr("-_", "+/")) end end
Version data entries
11 entries across 11 versions & 3 rubygems