symmetric-encryption 4.5.0 → 4.6.0

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
  SHA256:
3
- metadata.gz: cc6728652282c5b73acde1b45427e7dbce0092ceecc197a052f5364b83c53e28
4
- data.tar.gz: dad8b275ffd46adf20d2b3f51c7673b79e1cc359750626d4207f203a207c14f0
3
+ metadata.gz: 8e2c2ad605877325606a7a1d186768164ea937ea31c00dfbd03e9d9cb2af9fc4
4
+ data.tar.gz: c09040519caf78c1e323f176bbb9a4b1927285d9d8fda9db22cbf98e79c65445
5
5
  SHA512:
6
- metadata.gz: efd513c2c0b22b5252583a3d8207d89f907b695f6edf6c75d0f7a2c9177e8d32d5566d7228f36b7039318d4e72380f4cee4090048cf40f7bf50a492bf525fcc5
7
- data.tar.gz: bac21c5250923fd85134cc3a59e220ec2c87c85e4dc7f4efef280110c01852dd202256bcad5671d96dd7c7424c531b2bd237f0f9f85d5ac22bce24415ab6fcde
6
+ metadata.gz: d21beddef347085e73ac34ef570500d5b670b4d8d46db0bcc6bdf1578d677224e29c13810b425dc0889aee9c6af8e180b29d53f9a13a4d4702303b6bc099a88c
7
+ data.tar.gz: b8dd362780461aaa8b207ca1ba7c337ecbf05dd8b56a7c49cef1df2a04cff92fa76afe1efa1d16db8efb0d695cf9462aed2ad2ecf6c07703e5687a91c37b6188
data/README.md CHANGED
@@ -27,6 +27,13 @@ Checkout the sister project [Rocket Job](http://rocketjob.io): Ruby's missing ba
27
27
 
28
28
  Fully supports Symmetric Encryption to encrypt data in flight and at rest while running jobs in the background.
29
29
 
30
+ ## Upgrading to Rails V7
31
+
32
+ There is a method naming conflict with Rails 7, which has its own `encrypted_attributes` method.
33
+
34
+ As a result the older `attr_encrypted` mechanism is no longer available with Rails 7.
35
+ Migrate the use of `attr_encrypted` to `attribute` as described in the [Frameworks Guide](https://encryption.rocketjob.io/frameworks.html).
36
+
30
37
  ## Upgrading to SymmetricEncryption V4
31
38
 
32
39
  Version 4 of Symmetric Encryption has completely adopted the Ruby keyword arguments on most API's where
@@ -24,6 +24,10 @@ module SymmetricEncryption
24
24
  )
25
25
  end
26
26
 
27
+ def changed_in_place?(raw_old_value, new_value)
28
+ deserialize(raw_old_value) != new_value
29
+ end
30
+
27
31
  private
28
32
 
29
33
  # Symmetric Encryption uses coercible gem to handle casting
@@ -220,8 +220,7 @@ module SymmetricEncryption
220
220
 
221
221
  # Migrate old encrypted_iv
222
222
  if (encrypted_iv = config.delete(:encrypted_iv)) && private_rsa_key
223
- encrypted_iv = RSAKey.new(private_rsa_key).decrypt(encrypted_iv)
224
- config[:iv] = ::Base64.decode64(encrypted_iv)
223
+ config[:iv] = RSAKey.new(private_rsa_key).decrypt(::Base64.decode64(encrypted_iv))
225
224
  end
226
225
 
227
226
  # Migrate old iv_filename
@@ -1,3 +1,3 @@
1
1
  module SymmetricEncryption
2
- VERSION = "4.5.0".freeze
2
+ VERSION = "4.6.0".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: symmetric-encryption
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.5.0
4
+ version: 4.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Reid Morrison
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-27 00:00:00.000000000 Z
11
+ date: 2022-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: coercible