cryptology 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: be3f956af95f13d3a1c53155ab98651794402a38
4
- data.tar.gz: 45481cf1204233fa83b4647b8ae9f7f233170af6
3
+ metadata.gz: b6d8652577b9efbf08654071baa5eeaf5b7bab7d
4
+ data.tar.gz: 3b55e70aae9c511960b58c723e723ed55ebf217c
5
5
  SHA512:
6
- metadata.gz: a894dff57ff6c129010e6be2922425bcf0fa91f8873150f902a17da524460cb488b364e3df589a55967f674d4514430f8b2b38d5940e35bcb8d4e18d5d602ad1
7
- data.tar.gz: 79f2eae716e4011b28e842caea3f104e66f2341521e8fe9d514b739efc205debeb153143c6e0bcf8161fe346eaf7da45f8a8fc845a062cb977b860e06659f71f
6
+ metadata.gz: 7d2fa0167bb97234782fde940d707a30c3eb4bd9bd56bc1ba54ff34ab7bdd8155be35525e803f15b9be567665ab024be5b7f57eade759260a1395aa1d9b0a3f9
7
+ data.tar.gz: 76c7f040b484a1a051c739211dc0a4737ae68066d3bbef5fd4a229040d7a31c349799cce50b2e1efb17116d1636f97b1740bd9f0bcf9e567c203a54a9e522c5e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 1.0.1 (2015-12-08)
2
+
3
+ - Bug Fix: Allow iv to be nil
4
+
1
5
  ## 1.0.0 (2015-12-07)
2
6
 
3
7
  - Initial release
data/README.md CHANGED
@@ -54,7 +54,7 @@ iv = OpenSSL::Cipher::Cipher.new(algorithm).random_iv
54
54
  encrypted = Cryptology.encrypt(data, key, algorithm, iv)
55
55
 
56
56
  # Decrypt our data
57
- plain = Cryptology.decrypt(data, key, algorithm, iv)
57
+ plain = Cryptology.decrypt(encrypted, key, algorithm, iv)
58
58
 
59
59
  ```
60
60
 
data/lib/cryptology.rb CHANGED
@@ -20,7 +20,7 @@ module Cryptology
20
20
  cipher = ::OpenSSL::Cipher::Cipher.new(algorithm)
21
21
  cipher.encrypt
22
22
  cipher.key = key
23
- cipher.iv = iv
23
+ cipher.iv = iv unless iv.nil?
24
24
  cipher.update(data) + cipher.final
25
25
  end
26
26
 
@@ -28,7 +28,7 @@ module Cryptology
28
28
  decipher = ::OpenSSL::Cipher::Cipher.new(algorithm)
29
29
  decipher.decrypt
30
30
  decipher.key = key
31
- decipher.iv = iv
31
+ decipher.iv = iv unless iv.nil?
32
32
  decipher.update(encrypted_data) + decipher.final
33
33
  end
34
34
 
@@ -1,3 +1,3 @@
1
1
  module Cryptology
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cryptology
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitriy Tarasov