xml-kit 0.1.9 → 0.1.10

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
  SHA256:
3
- metadata.gz: fe677a736a2c2c4fa559c731f391757bfb0052cffb692f5febb47822f972ae43
4
- data.tar.gz: a280e8d5ae60c09b2e2413fc740a826d3495a65dc4327c1d2c8356f711e7dbc7
3
+ metadata.gz: c12fc0042cdb6c3b7e4dac42717dface3aabdc4562daff5064a8b9625098c830
4
+ data.tar.gz: c48ffe5e10168c54b00b06f4a4fdd4d507081b9e095a99ecb0e2e36836f51962
5
5
  SHA512:
6
- metadata.gz: d5ba0648633a8a0b343d80dd6e5606892af4db68b348ec160f9b39c3ad534cf40584550166be12de1a46057a077ce140ebf92918fd4f8521da8e42d63b515e2a
7
- data.tar.gz: 02311fcd7751e056693b863153e0f81d24db99681ba7a0eef342d5dafef0873c4818cedf5e9ad7022688cc450844909c920c2e9fc0fd36c9bc2d033626f2027c
6
+ metadata.gz: c79570b9ca7f4d5d2af0c73ba6ebab99036431eedea25d5172d9821be9eed8a93032bae1f17c5a741dbef9082eb34d79789e171e33533c874c7a09ef00c5233a
7
+ data.tar.gz: '08f7701cf7910493854373ab64babf67d801f88d0a3d0f565b8da4b64b342e9cd71f4a14b2ad38dffc18f6fe732691327d72f1f9829d8c371053bdab10ba10f3'
@@ -57,6 +57,7 @@ module Xml
57
57
  raise if attempts.zero?
58
58
  end
59
59
  end
60
+ raise DecryptionError.new(private_keys)
60
61
  end
61
62
 
62
63
  def to_plaintext(cipher_text, symmetric_key, algorithm)
@@ -0,0 +1,12 @@
1
+ module Xml
2
+ module Kit
3
+ class DecryptionError < StandardError
4
+ attr_reader :private_keys
5
+
6
+ def initialize(private_keys)
7
+ @private_keys = private_keys
8
+ super("Cannot decrypt document with the provided private keys")
9
+ end
10
+ end
11
+ end
12
+ end
@@ -1,5 +1,5 @@
1
1
  module Xml
2
2
  module Kit
3
- VERSION = "0.1.9"
3
+ VERSION = "0.1.10"
4
4
  end
5
5
  end
data/lib/xml/kit.rb CHANGED
@@ -14,6 +14,7 @@ require "xml/kit/namespaces"
14
14
  require "xml/kit/certificate"
15
15
  require "xml/kit/crypto"
16
16
  require "xml/kit/decryption"
17
+ require "xml/kit/decryption_error"
17
18
  require "xml/kit/document"
18
19
  require "xml/kit/encryption"
19
20
  require "xml/kit/fingerprint"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xml-kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - mo khan
@@ -175,6 +175,7 @@ files:
175
175
  - lib/xml/kit/crypto/symmetric_cipher.rb
176
176
  - lib/xml/kit/crypto/unknown_cipher.rb
177
177
  - lib/xml/kit/decryption.rb
178
+ - lib/xml/kit/decryption_error.rb
178
179
  - lib/xml/kit/document.rb
179
180
  - lib/xml/kit/encryption.rb
180
181
  - lib/xml/kit/fingerprint.rb