xmlenc 0.6.3 → 0.6.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/lib/xmlenc/algorithms/rsa_oaep_mgf1p.rb +1 -1
- data/lib/xmlenc/version.rb +1 -1
- data/spec/lib/xmlenc/encrypted_key_spec.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f42a034e24ec614a6ec82243b7fae02d7dd7568e
|
4
|
+
data.tar.gz: ee2f602d322d9d1c1fb67e723a4d88b5cc2783a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec19ef79d4ef7c85361f62eb13a18fa3979bbce289521d1e0e1b8911f69bc5d2c2924e7afe9f458d20214bfdf92dca0ced7890d12a844fe88bd171d434e8d348
|
7
|
+
data.tar.gz: 13190ccdb5144ec116e1c43406fdb8a9912c1ed5f78e17350dd2d71c1c6f986dcf424e525d0221a8378b3a13e4c9e12440e35e7d1e2cdac0a6fccdabef4b035c
|
data/.travis.yml
CHANGED
data/lib/xmlenc/version.rb
CHANGED
@@ -114,20 +114,26 @@ describe Xmlenc::EncryptedKey do
|
|
114
114
|
|
115
115
|
describe 'encrypt' do
|
116
116
|
let(:template_doc) { Nokogiri::XML::Document.parse(File.read('spec/fixtures/template.xml')) }
|
117
|
+
let(:template2_doc) { Nokogiri::XML::Document.parse(File.read('spec/fixtures/template2.xml')) }
|
117
118
|
let(:encrypted_key_template) { described_class.new(template_doc.at_xpath('//xenc:EncryptedKey', Xmlenc::NAMESPACES)) }
|
119
|
+
let(:encrypted_key_template2) { described_class.new(template2_doc.at_xpath('//xenc:EncryptedKey', Xmlenc::NAMESPACES)) }
|
118
120
|
let(:public_key) { private_key.public_key }
|
119
121
|
let(:data) { 'random key' }
|
120
122
|
|
121
123
|
it 'stores the encrypted value in the cipher value' do
|
122
124
|
encrypted_key_template.encrypt(public_key, data)
|
125
|
+
encrypted_key_template2.encrypt(public_key, data)
|
123
126
|
|
124
127
|
expect(encrypted_key_template.cipher_value.length).to be > 0
|
128
|
+
expect(encrypted_key_template2.cipher_value.length).to be > 0
|
125
129
|
end
|
126
130
|
|
127
131
|
it 'allows decryption with the key' do
|
128
132
|
encrypted_key_template.encrypt(public_key, data)
|
133
|
+
encrypted_key_template2.encrypt(public_key, data)
|
129
134
|
|
130
135
|
expect(encrypted_key_template.decrypt(private_key)).to be == data
|
136
|
+
expect(encrypted_key_template2.decrypt(private_key)).to be == data
|
131
137
|
end
|
132
138
|
end
|
133
139
|
|
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.6.
|
4
|
+
version: 0.6.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Benoist
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|