simple_crypt 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +9 -10
- data/lib/simple_crypt.rb +11 -0
- data/simple_crypt.gemspec +3 -2
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 759dcd13fbc4484e19940f5ebd2b18341fa7345710cef8eaf4d77f9d632de63d
|
4
|
+
data.tar.gz: cd30754c9bae61bbef924314101a2242c77c0d6b4f6ce1ed2be6230c63db5c7f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f612ce58ecfe426543a47c2f158f8fde246716ec84a6dc4042ea95531768f684e4650a5640260e2cfb95058bbfb6cf91897e590a590c66f60d22e86021cf260d
|
7
|
+
data.tar.gz: '0538005275a2ed07475247c96000a463df92acc055d203b528b8792a100a3a17d320c7f105ef62dd405279bec392228b1578f19932fb4f78c84fcce3fa6f8d41'
|
data/Gemfile.lock
CHANGED
@@ -1,24 +1,23 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
simple_crypt (1.0.1)
|
5
|
+
json
|
6
|
+
openssl (~> 2.1, >= 2.1.0)
|
7
|
+
|
1
8
|
GEM
|
2
9
|
remote: https://rubygems.org/
|
3
10
|
specs:
|
4
|
-
cryptor (1.1.1)
|
5
|
-
ordo (>= 0.0.2)
|
6
11
|
ipaddr (1.2.2)
|
7
|
-
|
12
|
+
json (2.1.0)
|
8
13
|
openssl (2.1.2)
|
9
14
|
ipaddr
|
10
|
-
ordo (0.0.2)
|
11
15
|
|
12
16
|
PLATFORMS
|
13
17
|
ruby
|
14
18
|
|
15
19
|
DEPENDENCIES
|
16
|
-
|
17
|
-
irb
|
18
|
-
openssl (>= 2.1.0)
|
19
|
-
|
20
|
-
RUBY VERSION
|
21
|
-
ruby 2.6.0p0
|
20
|
+
simple_crypt!
|
22
21
|
|
23
22
|
BUNDLED WITH
|
24
23
|
2.0.1
|
data/lib/simple_crypt.rb
CHANGED
@@ -1,10 +1,21 @@
|
|
1
1
|
require 'base64'
|
2
|
+
require 'json'
|
2
3
|
require 'openssl'
|
3
4
|
require 'securerandom'
|
4
5
|
|
5
6
|
# stores secret info as a class
|
6
7
|
class Secret
|
7
8
|
attr_accessor :secret_data, :iv, :salt, :auth_tag, :auth_data
|
9
|
+
|
10
|
+
def json
|
11
|
+
JSON.generate(
|
12
|
+
secret_data: secret_data,
|
13
|
+
iv: iv,
|
14
|
+
salt: salt,
|
15
|
+
auth_tag: auth_tag,
|
16
|
+
auth_data: auth_data
|
17
|
+
)
|
18
|
+
end
|
8
19
|
end
|
9
20
|
|
10
21
|
# encrypts and stores and decrypts secrets
|
data/simple_crypt.gemspec
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'simple_crypt'
|
3
|
-
s.version = '1.0.
|
3
|
+
s.version = '1.0.2'
|
4
4
|
s.date = '2019-02-12'
|
5
5
|
s.summary = 'A gem to encrypt and decrypt data using AES256-GCM and PBKDF using scrypt'
|
6
6
|
s.author = 'Nick Silverman'
|
7
7
|
s.license = 'GPL-3.0'
|
8
8
|
s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
9
9
|
s.require_paths = ['lib']
|
10
|
-
s.
|
10
|
+
s.add_runtime_dependency 'json'
|
11
|
+
s.add_runtime_dependency 'openssl', '~> 2.1', '>= 2.1.0'
|
11
12
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_crypt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Silverman
|
@@ -10,6 +10,20 @@ bindir: bin
|
|
10
10
|
cert_chain: []
|
11
11
|
date: 2019-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: json
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: openssl
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -20,7 +34,7 @@ dependencies:
|
|
20
34
|
- - "~>"
|
21
35
|
- !ruby/object:Gem::Version
|
22
36
|
version: '2.1'
|
23
|
-
type: :
|
37
|
+
type: :runtime
|
24
38
|
prerelease: false
|
25
39
|
version_requirements: !ruby/object:Gem::Requirement
|
26
40
|
requirements:
|