symmetric-encryption 0.1.1 → 0.1.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.
- data/lib/symmetric/encryption.rb +1 -1
- data/lib/symmetric/railtie.rb +10 -10
- data/lib/symmetric/version.rb +1 -1
- data/nbproject/private/config.properties +0 -0
- data/nbproject/private/private.properties +3 -0
- data/nbproject/private/private.xml +4 -0
- data/nbproject/private/rake-d.txt +4 -0
- data/nbproject/project.properties +9 -0
- data/nbproject/project.xml +16 -0
- data/symmetric-encryption-0.1.0.gem +0 -0
- data/symmetric-encryption-0.1.1.gem +0 -0
- metadata +41 -25
data/lib/symmetric/encryption.rb
CHANGED
@@ -55,7 +55,7 @@ module Symmetric
|
|
55
55
|
self.key = symmetric_key
|
56
56
|
self.iv = symmetric_iv
|
57
57
|
else
|
58
|
-
load_keys(config['symmetric_key_filename'], config['symmetric_iv_filename'], config['private_rsa_key'])
|
58
|
+
self.load_keys(config['symmetric_key_filename'], config['symmetric_iv_filename'], config['private_rsa_key'])
|
59
59
|
end
|
60
60
|
end
|
61
61
|
|
data/lib/symmetric/railtie.rb
CHANGED
@@ -19,22 +19,22 @@ module Symmetric #:nodoc:
|
|
19
19
|
# Initialize Symmetry. This will look for a symmetry.yml in the config
|
20
20
|
# directory and configure Symmetry appropriately.
|
21
21
|
#
|
22
|
-
# @example
|
22
|
+
# @example symmetric-encryption.yml
|
23
23
|
#
|
24
24
|
# development:
|
25
25
|
# cipher: aes-256-cbc
|
26
26
|
# symmetric_key: 1234567890ABCDEF1234567890ABCDEF
|
27
27
|
# symmetric_iv: 1234567890ABCDEF
|
28
28
|
#
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
29
|
+
# Loaded before Active Record initializes since database.yml can have encrypted
|
30
|
+
# passwords in it
|
31
|
+
initializer "load symmetry encryption keys" , :before=>"active_record.initialize_database" do
|
32
|
+
config_file = Rails.root.join("config", "symmetric-encryption.yml")
|
33
|
+
if config_file.file?
|
34
|
+
::Symmetric::Encryption.load!(config_file, Rails.env)
|
35
|
+
else
|
36
|
+
puts "\nSymmetric Encryption config not found. Create a config file at: config/symmetric-encryption.yml"
|
37
|
+
# puts "to generate one run: rails generate symmetric-encryption:config\n\n"
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
data/lib/symmetric/version.rb
CHANGED
File without changes
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project xmlns="http://www.netbeans.org/ns/project/1">
|
3
|
+
<type>org.netbeans.modules.ruby.rubyproject</type>
|
4
|
+
<configuration>
|
5
|
+
<data xmlns="http://www.netbeans.org/ns/ruby-project/1">
|
6
|
+
<name>symmetric-encryption</name>
|
7
|
+
<source-roots>
|
8
|
+
<root id="src.lib.dir" name="Source Files"/>
|
9
|
+
<root id="src.examples.dir" name="Examples"/>
|
10
|
+
</source-roots>
|
11
|
+
<test-roots>
|
12
|
+
<root id="test.test.dir" name="Test Files"/>
|
13
|
+
</test-roots>
|
14
|
+
</data>
|
15
|
+
</configuration>
|
16
|
+
</project>
|
Binary file
|
Binary file
|
metadata
CHANGED
@@ -1,21 +1,26 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: symmetric-encryption
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 1
|
8
|
+
- 2
|
9
|
+
version: 0.1.2
|
6
10
|
platform: ruby
|
7
11
|
authors:
|
8
|
-
|
12
|
+
- Reid Morrison
|
9
13
|
autorequire:
|
10
14
|
bindir: bin
|
11
15
|
cert_chain: []
|
12
16
|
|
13
|
-
date: 2012-01-
|
17
|
+
date: 2012-01-24 00:00:00 -05:00
|
18
|
+
default_executable:
|
14
19
|
dependencies: []
|
15
20
|
|
16
21
|
description: Symmetric Encryption is a library to seamlessly enable symmetric encryption in a project, written in Ruby.
|
17
22
|
email:
|
18
|
-
|
23
|
+
- reidmo@gmail.com
|
19
24
|
executables: []
|
20
25
|
|
21
26
|
extensions: []
|
@@ -23,16 +28,25 @@ extensions: []
|
|
23
28
|
extra_rdoc_files: []
|
24
29
|
|
25
30
|
files:
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
31
|
+
- lib/symmetric/encryption.rb
|
32
|
+
- lib/symmetric/extensions/active_record/base.rb
|
33
|
+
- lib/symmetric/railtie.rb
|
34
|
+
- lib/symmetric/railties/symmetric_encryption.rake
|
35
|
+
- lib/symmetric/version.rb
|
36
|
+
- lib/symmetric-encryption.rb
|
37
|
+
- LICENSE.txt
|
38
|
+
- nbproject/private/config.properties
|
39
|
+
- nbproject/private/private.properties
|
40
|
+
- nbproject/private/private.xml
|
41
|
+
- nbproject/private/rake-d.txt
|
42
|
+
- nbproject/project.properties
|
43
|
+
- nbproject/project.xml
|
44
|
+
- Rakefile
|
45
|
+
- README.md
|
46
|
+
- symmetric-encryption-0.1.0.gem
|
47
|
+
- symmetric-encryption-0.1.1.gem
|
48
|
+
- test/encryption_test.rb
|
49
|
+
has_rdoc: true
|
36
50
|
homepage: https://github.com/ClarityServices/symmetric-encryption
|
37
51
|
licenses: []
|
38
52
|
|
@@ -40,23 +54,25 @@ post_install_message:
|
|
40
54
|
rdoc_options: []
|
41
55
|
|
42
56
|
require_paths:
|
43
|
-
|
57
|
+
- lib
|
44
58
|
required_ruby_version: !ruby/object:Gem::Requirement
|
45
|
-
none: false
|
46
59
|
requirements:
|
47
|
-
|
48
|
-
|
49
|
-
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
segments:
|
63
|
+
- 0
|
64
|
+
version: "0"
|
50
65
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
51
|
-
none: false
|
52
66
|
requirements:
|
53
|
-
|
54
|
-
|
55
|
-
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
segments:
|
70
|
+
- 0
|
71
|
+
version: "0"
|
56
72
|
requirements: []
|
57
73
|
|
58
74
|
rubyforge_project:
|
59
|
-
rubygems_version: 1.
|
75
|
+
rubygems_version: 1.3.6
|
60
76
|
signing_key:
|
61
77
|
specification_version: 3
|
62
78
|
summary: Symmetric Encryption for Ruby, and Ruby on Rails
|