easy_cipher 0.9.0 → 0.9.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: a45c8a563832ddfceed97b0ec41ec6000955d2c8
4
- data.tar.gz: 8a723173ad1aeccf7d65345f1e6d94b30b3376e4
3
+ metadata.gz: b9fc5872680808f09db845d339ef93d4d883c70d
4
+ data.tar.gz: 31d4cf5bd1c6dd0631e6fe8cfd594139c1a99efd
5
5
  SHA512:
6
- metadata.gz: f17be959ad6d87d67171cc04cf323cf20f71b3de55619ecfd8759163076d9e4bc083dee6d443227a2ada6f74f26fe7c4c1874def2227218da28e253f657aa2fb
7
- data.tar.gz: 39eaf348a60ef22e1afda21ddd5c80ef15bbf61e930c79a8b0b0fc47c5899ebd04321f4a1abebaf0f147a8c26f219061ffffd8d409538590a23e10b66ee5af7e
6
+ metadata.gz: ce6acffd4b3d174550f631f167ba4c1ef31307138ebe9eb896a4f49d04febdb433e2d7533580b2be68c48aace4628efa3beb6626fecfb6ecbb97a9a6a9fd4ebe
7
+ data.tar.gz: 407810733d261f3081a1b1e067c649ddb83618d3d438142f09558e05fa6e0b33a8c663b7e1426c35685a172a06ae7b1c248db08e8f2e08e67366e1674dfdfa1a
@@ -66,13 +66,14 @@ class EasyCipher::Cipher
66
66
  # @param encrypted_data [String] Base64 representation of the encrypted data.
67
67
  # @return [String] The decrypted data.
68
68
  def decrypt(encrypted_data)
69
- return decrypt_line(Base64.decode64(encrypted_data))
69
+ return decrypt_line(Base64.decode64(encrypted_data), true)
70
70
  end
71
71
 
72
72
 
73
73
 
74
74
  protected
75
75
  def encrypt_line(line, final = true)
76
+ @encryptor.reset
76
77
  output = @encryptor.update(line)
77
78
  if final
78
79
  output << @encryptor.final
@@ -82,6 +83,7 @@ class EasyCipher::Cipher
82
83
 
83
84
 
84
85
  def decrypt_line(line, final = true)
86
+ @decryptor.reset
85
87
  output = @decryptor.update(line)
86
88
  if final
87
89
  output << @decryptor.final
@@ -1,3 +1,3 @@
1
1
  module EasyCipher
2
- VERSION = "0.9.0"
2
+ VERSION = "0.9.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy_cipher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bryan Hockey