ubiq-security 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -4
- data/lib/ubiq/auth.rb +5 -1
- data/lib/ubiq/host.rb +4 -1
- data/lib/ubiq/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cfa206519b2bde1e566a7d55830bee2b5a68a3b6613b92eaaf59fa984f4818ce
|
4
|
+
data.tar.gz: d08cf519e3d0ec92845e68cd4132e2dc30b31c3a65154c566e6be21604b50b72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74e12caae5793215eb606adc55dd773e172d567b1ae780c95e10601adaa2eb374d7a40557865213e60f58d18d550c88f3913ccda9d3bc355f100128aec747d11
|
7
|
+
data.tar.gz: 265978ac51da6790983dba2b6f7d6f8ed03c6c49116a7ad18d291a28392370f0c5a5fcd2ec93dbac4976baa1607b74519ef5e6ee097cb97d5cb729478d7c2b49
|
data/README.md
CHANGED
@@ -82,7 +82,7 @@ Pass credentials and data into the encryption function. The encrypted data will
|
|
82
82
|
|
83
83
|
|
84
84
|
```ruby
|
85
|
-
require
|
85
|
+
require 'ubiq-security'
|
86
86
|
include Ubiq
|
87
87
|
|
88
88
|
encrypted_data = encrypt(credentials, plaintext_data)
|
@@ -94,7 +94,7 @@ encrypted_data = encrypt(credentials, plaintext_data)
|
|
94
94
|
Pass credentials and encrypted data into the decryption function. The plaintext data will be returned.
|
95
95
|
|
96
96
|
```ruby
|
97
|
-
require
|
97
|
+
require 'ubiq-security'
|
98
98
|
include Ubiq
|
99
99
|
|
100
100
|
plaintext_data = decrypt(credentials, encrypted_data)
|
@@ -111,7 +111,7 @@ plaintext_data = decrypt(credentials, encrypted_data)
|
|
111
111
|
|
112
112
|
|
113
113
|
```ruby
|
114
|
-
require
|
114
|
+
require 'ubiq-security'
|
115
115
|
include Ubiq
|
116
116
|
|
117
117
|
# Process 1 MiB of plaintext data at a time
|
@@ -146,7 +146,7 @@ BLOCK_SIZE = 1024 * 1024
|
|
146
146
|
|
147
147
|
|
148
148
|
```ruby
|
149
|
-
require
|
149
|
+
require 'ubiq-security'
|
150
150
|
include Ubiq
|
151
151
|
|
152
152
|
# Process 1 MiB of encrypted data at a time
|
data/lib/ubiq/auth.rb
CHANGED
@@ -87,9 +87,13 @@ module Ubiq
|
|
87
87
|
return all_headers
|
88
88
|
end
|
89
89
|
|
90
|
+
# Only want to return port in the URI if the
|
91
|
+
# host contained one, otherwise let gateway resolve it
|
90
92
|
def self.get_host(host)
|
91
93
|
uri = URI(host)
|
92
|
-
|
94
|
+
ret = uri.hostname.to_s
|
95
|
+
ret += ":#{uri.port}" if host.match(/:[0-9]+/)
|
96
|
+
ret
|
93
97
|
end
|
94
98
|
|
95
99
|
def self.get_date
|
data/lib/ubiq/host.rb
CHANGED
data/lib/ubiq/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ubiq-security
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ubiq Security, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-08-
|
11
|
+
date: 2020-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rb-readline
|