action_encrypt 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/action_encrypt/configuration.rb +15 -0
- data/lib/action_encrypt/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: 9017388cac062e1e2f25524d728da933bad8186fd48cbc6d6c960e105200ac5e
|
4
|
+
data.tar.gz: 988f579357bfb65782555bea79b61fa74d028fd73e4ff1925cfcf70de2e8a826
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7144f8c6b7aa3dce9306c70a5f467f8862f9ce99bff4f9d90034274bade0f2b65aac797e2a2af5d6bb5724d168ca5264ec963e575dd1210ca988e7bce265f52
|
7
|
+
data.tar.gz: 53d17965935871ec19a762461e6414604319932aec885bb1fa3a2ee9e808c1bb8e9f6f11bbffb8c556ddb171247a2d3a91ace2d40fe8f4cbd651b356786f129d
|
@@ -3,5 +3,20 @@
|
|
3
3
|
module ActionEncrypt
|
4
4
|
class Configuration
|
5
5
|
attr_accessor :key_encryption_key, :blind_index_key
|
6
|
+
|
7
|
+
def initialize(key_encryption_key: nil, blind_index_key: nil)
|
8
|
+
@key_encryption_key = key_encryption_key.presence || default_key_encryption_key
|
9
|
+
@blind_index_key = blind_index_key.presence || default_blind_index_key
|
10
|
+
end
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
def default_key_encryption_key
|
15
|
+
Rails.application.credentials.key_encryption_key
|
16
|
+
end
|
17
|
+
|
18
|
+
def default_blind_index_key
|
19
|
+
Rails.application.credentials.blind_index_key
|
20
|
+
end
|
6
21
|
end
|
7
22
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: action_encrypt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Van Der Beek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-12-
|
11
|
+
date: 2021-12-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|