qc.rb 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/qc.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f5d9c3be25df703a847e4c011f52764f6c5c1a4
|
4
|
+
data.tar.gz: 8d61c9ca284c35b94afad0f5e8aff38714efb7a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a9368cc5a487984e2df5e2931528d17d2acb9371411e390f8f37b35f6aec5356e477bea281ea595dfb20ae369beca7aa4789ca6d9a95bb32a913142135ea06b
|
7
|
+
data.tar.gz: 388a58e4f6fb7772dc74201148dc8441e8ea76b37850fc35bb12943749256b52eb910a932089fd41ef2ca1610c7eb5b8ee2aba5db6c1318c59f5a058cf6efb59
|
data/lib/qc.rb
CHANGED
@@ -7,7 +7,7 @@ require 'yaml'
|
|
7
7
|
require 'fileutils'
|
8
8
|
|
9
9
|
module QC
|
10
|
-
VERSION = '0.0.
|
10
|
+
VERSION = '0.0.8'
|
11
11
|
|
12
12
|
def QC.load_config key
|
13
13
|
f = File.expand_path('~/.qingcloud/config.yaml')
|
@@ -51,7 +51,7 @@ module QC
|
|
51
51
|
QC::Zone = QC.load_config('zone')
|
52
52
|
|
53
53
|
def QC.hmac key, data
|
54
|
-
hmac = OpenSSL::HMAC.digest(OpenSSL::Digest
|
54
|
+
hmac = OpenSSL::HMAC.digest(OpenSSL::Digest.new('sha256'), key, data)
|
55
55
|
b64_hmac = Base64.encode64(hmac).strip
|
56
56
|
url_b64_hmac = CGI.escape(b64_hmac)
|
57
57
|
end
|