Sha256: f0bd6b2967ac3126b8892ef8b8c52bff53a02645be721cc7cf17d8da85c1f301
Contents?: true
Size: 595 Bytes
Versions: 52
Compression:
Stored size: 595 Bytes
Contents
require "cgi" require 'zlib' module Spid 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
52 entries across 52 versions & 1 rubygems