naoki 1.0.12 → 1.0.13
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/data_secure_wrapper.rb +0 -1
- data/naoki.gemspec +1 -1
- data/sample.rb +5 -3
- metadata +2 -2
data/lib/data_secure_wrapper.rb
CHANGED
data/naoki.gemspec
CHANGED
data/sample.rb
CHANGED
@@ -4,7 +4,8 @@ properties_file = 'IngrianNAE.properties'
|
|
4
4
|
user_name = 'stg-MySQL_user2'
|
5
5
|
password = 'y)$)=M_-c52#!_2'
|
6
6
|
algorithm = 'AES/CBC/PKCS5Padding'
|
7
|
-
key_name = 'stg-new-test-key'
|
7
|
+
key_name = 'stg-new-test-key' # versioned key
|
8
|
+
#key_name = "stg-encrypt-test1" #non-versioned key
|
8
9
|
initialization_vector = '1234567890123456'
|
9
10
|
|
10
11
|
input_data = 'qwertyuiopasdfghjkl;zxcvbnm,./'
|
@@ -14,8 +15,9 @@ input_data = 'qwertyuiopasdfghjkl;zxcvbnm,./'
|
|
14
15
|
DataSecureWrapper.configure(properties_file)
|
15
16
|
DataSecureWrapper.open(user_name, password)
|
16
17
|
encrypted_data = DataSecureWrapper.encrypt(algorithm, key_name, initialization_vector, input_data)
|
17
|
-
|
18
|
-
|
18
|
+
puts encrypted_data
|
19
|
+
decrypted_data = DataSecureWrapper.decrypt(algorithm, key_name, initialization_vector, 'abc1')
|
20
|
+
exit(0)
|
19
21
|
GC.start
|
20
22
|
puts `ps -o rss= -p #{Process.pid}`.to_i
|
21
23
|
1_000.times do
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: naoki
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 1.0.
|
5
|
+
version: 1.0.13
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Chris Apolzon
|
@@ -11,7 +11,7 @@ autorequire:
|
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
13
|
|
14
|
-
date: 2011-03-
|
14
|
+
date: 2011-03-28 00:00:00 -07:00
|
15
15
|
default_executable:
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|