Sha256: 5755bca0532fb3421925096e09f85ad279aca5f7ed947259947a22c42d406f0c
Contents?: true
Size: 321 Bytes
Versions: 11
Compression:
Stored size: 321 Bytes
Contents
require 'openssl' require 'base64' require 'cgi' module OAuth module Helper extend self def escape(value) CGI.escape(value.to_s).gsub("%7E", '~').gsub("+", "%20") end def generate_key(size=32) Base64.encode64(OpenSSL::Random.random_bytes(size)).gsub(/\W/,'') end end end
Version data entries
11 entries across 11 versions & 4 rubygems