trustev 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/trustev/authenticate.rb +4 -4
- data/lib/trustev/digital_signature.rb +3 -3
- data/lib/trustev/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e9a776e416ec41456e29afd91623c31bb0c6ca9
|
4
|
+
data.tar.gz: c05ff41e28b2471d362f10c11064f1ebcab1091b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ca4704b5609dbc04abccfced2121caaeed7c803f76adfeacbc3915b4df75debe7c9b152092d2e38a34f3c4d6743b625340dfb2e575e9f15bf9ef23b3d1c4a84
|
7
|
+
data.tar.gz: 7d27c2a3e56052f58c30e158b4e00735d8f34ea31a55a140107d2592438ec6f47431edb10a13185860841f13856c1b5cf8f39fc294f95caff92172d92e9156ca
|
data/README.md
CHANGED
@@ -248,7 +248,7 @@ This is similar `Trustev::Social.create`, but only accepts ONE hash, instead of
|
|
248
248
|
```ruby
|
249
249
|
# profile = Trustev::Profile.new(transaction_number)
|
250
250
|
# profile.retrieve_scores
|
251
|
-
Trustev::Profile.
|
251
|
+
profile = Trustev::Profile.new('1234abcd')
|
252
252
|
profile.retrieve_scores
|
253
253
|
```
|
254
254
|
|
@@ -287,7 +287,7 @@ This returns a hash with the Trustev Score.
|
|
287
287
|
```ruby
|
288
288
|
# profile = Trustev::Profile.new(transaction_number)
|
289
289
|
# profile.get_overall_score
|
290
|
-
Trustev::Profile.
|
290
|
+
profile = Trustev::Profile.new('1234abcd')
|
291
291
|
profile.get_overall_score
|
292
292
|
```
|
293
293
|
|
@@ -297,7 +297,7 @@ This returns the overall Trustev score
|
|
297
297
|
```ruby
|
298
298
|
# profile = Trustev::Profile.new(transaction_number)
|
299
299
|
# profile.get_score(source_id, parameter_id)
|
300
|
-
Trustev::Profile.
|
300
|
+
profile = Trustev::Profile.new('1234abcd')
|
301
301
|
profile.get_score(Trustev::SCORE_SOURCES[:trustev], Trustev::SCORE_PARAMETERS[:overall])
|
302
302
|
```
|
303
303
|
|
data/lib/trustev/authenticate.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'openssl'
|
2
2
|
|
3
3
|
module Trustev
|
4
4
|
class Authenticate
|
@@ -36,12 +36,12 @@ module Trustev
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def self.generate_hash(modifier, time)
|
39
|
-
sha256 = Digest::SHA256.new
|
39
|
+
sha256 = OpenSSL::Digest::SHA256.new
|
40
40
|
sha256 << "#{time.strftime '%Y%m%d%H%M%S'}.#{modifier}"
|
41
41
|
hash_part_1 = sha256.hexdigest
|
42
|
-
sha256 = Digest::SHA256.new
|
42
|
+
sha256 = OpenSSL::Digest::SHA256.new
|
43
43
|
sha256 << "#{hash_part_1}.#{Trustev.shared_secret}"
|
44
44
|
sha256.hexdigest
|
45
45
|
end
|
46
46
|
end
|
47
|
-
end
|
47
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'openssl'
|
2
2
|
|
3
3
|
module Trustev
|
4
4
|
class DigitalSignature
|
@@ -37,11 +37,11 @@ module Trustev
|
|
37
37
|
private
|
38
38
|
|
39
39
|
def build_signature
|
40
|
-
sha256 = Digest::SHA256.new
|
40
|
+
sha256 = OpenSSL::Digest::SHA256.new
|
41
41
|
sha256 << "#{Trustev.username}.#{Trustev.private_key}.#{@timestamp}#{@stage_1}"
|
42
42
|
stage_2 = sha256.hexdigest
|
43
43
|
|
44
|
-
sha256 = Digest::SHA256.new
|
44
|
+
sha256 = OpenSSL::Digest::SHA256.new
|
45
45
|
sha256 << "#{stage_2}.#{Trustev.private_key}.#{@session_id}"
|
46
46
|
sha256.hexdigest
|
47
47
|
end
|
data/lib/trustev/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trustev
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonah Hirsch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|