Sha256: 9a42c0f31ed5492d170a7622dce45fa4897911a015cb83825b5efe36aa18a9fd
Contents?: true
Size: 595 Bytes
Versions: 10
Compression:
Stored size: 595 Bytes
Contents
require "cgi" require 'zlib' module Ciam module Saml module Coding def decode(encoded) Base64.decode64(encoded) end def encode(encoded) Base64.encode64(encoded).gsub(/\n/, "") end def escape(unescaped) CGI.escape(unescaped) end def unescape(escaped) CGI.unescape(escaped) end def inflate(deflated) zlib = Zlib::Inflate.new(-Zlib::MAX_WBITS) zlib.inflate(deflated) end def deflate(inflated) Zlib::Deflate.deflate(inflated, 9)[2..-5] end end end end
Version data entries
10 entries across 10 versions & 1 rubygems