naoki 1.0.12 → 1.0.13

Sign up to get free protection for your applications and to get access to all the features.
@@ -50,7 +50,6 @@ else
50
50
  @@cipherspec_pointer = nil
51
51
  I_C_CloseSession(@@session_pointer.get_pointer(0)) if @@session_pointer
52
52
  @@session_pointer = nil
53
- I_C_Fini()
54
53
  raise I_C_GetErrorString(return_code)
55
54
  end
56
55
  end
data/naoki.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  SPEC = Gem::Specification.new do |s|
2
2
  s.name = "naoki"
3
- s.version = "1.0.12"
3
+ s.version = "1.0.13"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.homepage = ""
6
6
  s.summary = "C bindings for SafeNet DataSecure ICAPI"
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
- decrypted_data = DataSecureWrapper.decrypt(algorithm, key_name, initialization_vector, encrypted_data)
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.12
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-22 00:00:00 -07:00
14
+ date: 2011-03-28 00:00:00 -07:00
15
15
  default_executable:
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency