Module: NIFTY
- Defined in:
- lib/NIFTY/exceptions.rb,
lib/NIFTY.rb,
lib/NIFTY/Cloud.rb,
lib/NIFTY/config.rb,
lib/NIFTY/version.rb,
lib/NIFTY/responses.rb,
lib/NIFTY/Cloud/images.rb,
lib/NIFTY/Cloud/volumes.rb,
lib/NIFTY/Cloud/keypairs.rb,
lib/NIFTY/Cloud/instances.rb,
lib/NIFTY/Cloud/certificates.rb,
lib/NIFTY/Cloud/load_balancers.rb,
lib/NIFTY/Cloud/security_groups.rb,
lib/NIFTY/Cloud/availability_zones.rb
Overview
– エラークラス ++
Defined Under Namespace
Modules: Cloud Classes: ArgumentError, Base, ConfigurationError, Error, Response, ResponseError, ResponseFormatError
Constant Summary collapse
- LOG =
Logger.new(STDOUT)
- VERSION =
'1.7'
Class Method Summary collapse
-
.encode(secret_key, str, key_type, urlencode = true) ⇒ Object
署名パラメータ文字列生成 urlencodeが真の場合はURLエンコードを行い、偽の場合はエンコードしない.
Class Method Details
.encode(secret_key, str, key_type, urlencode = true) ⇒ Object
署名パラメータ文字列生成
urlencodeが真の場合はURLエンコードを行い、偽の場合はエンコードしない
59 60 61 62 63 64 65 66 67 68 |
# File 'lib/NIFTY.rb', line 59 def NIFTY.encode(secret_key, str, key_type, urlencode=true) digest = OpenSSL::Digest::Digest.new(key_type) b64_hmac = Base64.encode64(OpenSSL::HMAC.digest(digest, secret_key, str)).strip if urlencode return CGI::escape(b64_hmac) else return b64_hmac end end |