encrypted_field 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +2 -0
- data/lib/encrypted_field.rb +1 -1
- data/lib/encrypted_field/version.rb +1 -1
- data/lib/tasks/generate_keypair.rake +17 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0a5b29b39b0f21234f8c32cbacf4dacea0cd8ec
|
4
|
+
data.tar.gz: a960784ffb0be6ed0cc29a2eb682765b46cac545
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f79690de1cc0f7f500ae9ffa01481b6ee0c58fb7d51953486c26b6cd3e18ae6b2d6602f92d29657ee38e3930ed977a23dc2df05342a1add3ea8da0582f14dc61
|
7
|
+
data.tar.gz: 85327e301b2931ce0afbbcf938eb38b5a9171e3fd0bd5de798ade253233af59ec3b394a4dbf3d673ea01649c16d17e65460e8683a9cc292d38cc78cc2a0864c4
|
data/Rakefile
CHANGED
data/lib/encrypted_field.rb
CHANGED
@@ -0,0 +1,17 @@
|
|
1
|
+
namespace :keypair do
|
2
|
+
desc "generate key pair"
|
3
|
+
task :generate, [:path] do |t, args|
|
4
|
+
rsa_key = OpenSSL::PKey::RSA.new(2048)
|
5
|
+
private_key = rsa_key.to_pem
|
6
|
+
public_key = rsa_key.public_key.to_pem
|
7
|
+
path = (args[:path] || '.')
|
8
|
+
|
9
|
+
File.open("#{path}/encrypted_field_public_key.pem", "w+") do |f|
|
10
|
+
f.write public_key
|
11
|
+
end
|
12
|
+
|
13
|
+
File.open("#{path}/encrypted_field_private_key.pem", "w+") do |f|
|
14
|
+
f.write private_key
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: encrypted_field
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- akil
|
@@ -71,6 +71,7 @@ files:
|
|
71
71
|
- encrypted_field.gemspec
|
72
72
|
- lib/encrypted_field.rb
|
73
73
|
- lib/encrypted_field/version.rb
|
74
|
+
- lib/tasks/generate_keypair.rake
|
74
75
|
homepage:
|
75
76
|
licenses:
|
76
77
|
- MIT
|