auric-vault-door 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +4 -1
- data/lib/auric/vault/door.rb +9 -9
- data/lib/auric/vault/door/version.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -18,7 +18,10 @@ Or install it yourself as:
|
|
18
18
|
|
19
19
|
## Usage
|
20
20
|
|
21
|
-
|
21
|
+
It now expects a hash or arguments when being created:
|
22
|
+
args = {secret: 'shared_secret_goes_here', mtid: 'merchant_id', config_id: 'config_id', segment: '123'} #optional: production: true, defaults to false
|
23
|
+
|
24
|
+
@door = Auric::Vault::Door.new(args)
|
22
25
|
|
23
26
|
@door.encrypt('string_to_encrypt')
|
24
27
|
=> 'dpFAl7BY260IWzFxxxx'
|
data/lib/auric/vault/door.rb
CHANGED
@@ -95,15 +95,15 @@ module Auric
|
|
95
95
|
headers: { 'X-VAULT-HMAC' => signature }
|
96
96
|
}
|
97
97
|
)
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
98
|
+
rescue
|
99
|
+
HTTParty.post(
|
100
|
+
@url[1],
|
101
|
+
{
|
102
|
+
:body => data.to_json,
|
103
|
+
headers: { 'X-VAULT-HMAC' => signature }
|
104
|
+
}
|
105
|
+
)
|
106
|
+
end
|
107
107
|
end
|
108
108
|
|
109
109
|
def post_data(method, data)
|