xmlenc 0.1.7 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 49d49e505ce78713f772baae51ff21f3a85fcb2a
4
- data.tar.gz: d899c42bbf61eeb8bcc40acb50e71affd440ab71
3
+ metadata.gz: a4f1124fa5bd31f8c364288d7d7f56e00bebab77
4
+ data.tar.gz: 6f3aa991240dc4c96873ceb7e326f0b0b886f77d
5
5
  SHA512:
6
- metadata.gz: 11a17de9cec2a3dc54565dcb90490ae2516a8ad2985fe8e0f8f6a3e6864ba41d2ae088978b16624e017de6ff59492ab809c82b532c03bc8a2c21b9a4cecddf66
7
- data.tar.gz: 4a666b0a754f3046962a5e5f3e6b065d6226e706f38da80111c0c15bf6ad5ebf864c1430b4f26b29eb40b62a922c20eec74e2dc6f01263c35e44e285ea30c4f3
6
+ metadata.gz: 1b15580ce2af23aa3520dddb2fa143cf9a7575e191140102ef9463f2ca2b32c3f1d1ab053c3a6868c3caa6d6964898793ee57d086565f5fb398f367ba4f11a6b
7
+ data.tar.gz: 4da800f73ab72328bc092f2941d26fb7aa0cac0736d9d2c27e7e8283b91bee996f1b09e09e91ad505785bf708e66602b7ef8455698483bca5973ce1a433582fb
@@ -20,9 +20,13 @@ module Xmlenc
20
20
 
21
21
  def decrypt(cipher_value, options = {})
22
22
  cipher.decrypt
23
- cipher.key = @key
24
- cipher.iv = cipher_value[0...iv_len]
25
- cipher.update(cipher_value[iv_len..-1]) << cipher.final
23
+ cipher.padding = 0
24
+ cipher.key = @key
25
+ cipher.iv = cipher_value[0...iv_len]
26
+ result = cipher.update(cipher_value[iv_len..-1]) << cipher.final
27
+
28
+ padding_size = result.last.unpack('c').first
29
+ result[0...-padding_size]
26
30
  end
27
31
 
28
32
  def encrypt(data, options = {})
@@ -1,3 +1,3 @@
1
1
  module Xmlenc
2
- VERSION = "0.1.7"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -0,0 +1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aVZVUWMzWEZnTXlGSG11YXV1T1VoSW9kbWYxN3ljS0VPcVdzSUdtcURJVzVwZC9JL0dzNlFNYUFCNXRMZ1Boc2hRNE1oM082aGt0OEMwVlBkTHhhZmIvMGt0VjJzd1NjS1FRSXRCZUNFM0YyZ2Z6OE5oTTFYUUlleGQrTFBCc1lCaGNMcTlVaUJ4S0xFeG54U21hbERJYWgwbWRtUGpjMGZsMXZwNlZwcnRocjViL3dpd2txM01mb09SRERiZjZBTmhuaEFsRkEwTXN4b2tabHFEcDJFKzdhZncvSmxNZGZ5cmFxYm93aUxXTnhVcFFOYlF1SUplc2JvRFkySjBsU1JnaEl4WmMzUmVZWlFZeHAwWFBOLzBzVUV4TjFSdXl6SHAwK2Y3ZFA4R1d6eEVyNkNJSW55cXNFdjVnNkQzNzJhZUxTczFqcXQxVVZYSjwveGVuYzpDaXBoZXJWYWx1ZT48L3hlbmM6Q2lwaGVyRGF0YT48L3hlbmM6RW5jcnlwdGVkRGF0YT48L3NhbWwyOkVuY3J5cHRlZEFzc2VydGlvbj48L3NhbWwycDpSZXNwb25zZT4=
@@ -0,0 +1,18 @@
1
+ require 'spec_helper'
2
+
3
+ describe Xmlenc do
4
+
5
+ Dir["spec/fixtures/encrypted/*.txt"].each do |document|
6
+ describe "#{document}" do
7
+ let(:encrypted_xml) { Base64.decode64(File.read(document)) }
8
+ let(:encrypted_document) { Xmlenc::EncryptedDocument.new(encrypted_xml) }
9
+ let(:private_key) { OpenSSL::PKey::RSA.new(File.read(document.gsub('.txt', '.pem'))) }
10
+
11
+ it "should be validateable" do
12
+ expect {
13
+ @decrypted = encrypted_document.decrypt(private_key)
14
+ }.not_to raise_error
15
+ end
16
+ end
17
+ end
18
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xmlenc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benoist
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-20 00:00:00.000000000 Z
11
+ date: 2015-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -140,6 +140,8 @@ files:
140
140
  - lib/xmlenc/encrypted_document.rb
141
141
  - lib/xmlenc/encrypted_key.rb
142
142
  - lib/xmlenc/version.rb
143
+ - spec/fixtures/encrypted/java_to_ruby.pem
144
+ - spec/fixtures/encrypted/java_to_ruby.txt
143
145
  - spec/fixtures/encrypted_document.xml
144
146
  - spec/fixtures/encrypted_document_no_ref_list.xml
145
147
  - spec/fixtures/key.pem
@@ -171,6 +173,7 @@ files:
171
173
  - spec/lib/xmlenc/encrypted_document_spec.rb
172
174
  - spec/lib/xmlenc/encrypted_key_spec.rb
173
175
  - spec/lib/xmlenc/phaos_compat_spec.rb
176
+ - spec/lib/xmlenc/xmlenc_spec.rb
174
177
  - spec/spec_helper.rb
175
178
  - xmlenc.gemspec
176
179
  homepage: https://github.com/digidentity/xmlenc
@@ -193,11 +196,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
193
196
  version: '0'
194
197
  requirements: []
195
198
  rubyforge_project:
196
- rubygems_version: 2.4.5
199
+ rubygems_version: 2.4.6
197
200
  signing_key:
198
201
  specification_version: 4
199
202
  summary: A (partial)implementation of the XMLENC specificiation
200
203
  test_files:
204
+ - spec/fixtures/encrypted/java_to_ruby.pem
205
+ - spec/fixtures/encrypted/java_to_ruby.txt
201
206
  - spec/fixtures/encrypted_document.xml
202
207
  - spec/fixtures/encrypted_document_no_ref_list.xml
203
208
  - spec/fixtures/key.pem
@@ -229,4 +234,5 @@ test_files:
229
234
  - spec/lib/xmlenc/encrypted_document_spec.rb
230
235
  - spec/lib/xmlenc/encrypted_key_spec.rb
231
236
  - spec/lib/xmlenc/phaos_compat_spec.rb
237
+ - spec/lib/xmlenc/xmlenc_spec.rb
232
238
  - spec/spec_helper.rb