Closed ribose-jeffreylau closed 7 years ago
@ribose-jeffreylau see https://github.com/riboseinc/transcryptor/pull/30/commits/f0611dd240441b364860ae344912b0b7fd04e1e8 . I moved a lot of logic to separate classes without any spec change. Now it looks almost awesome 😄
👍 cuz it IS awesome! Thanks @DmitryDrobotov ! :D
Add spec to check for validity of decrypted values.
Make sure the new encryption configs can actually decrypt.
With #21 (via #25), extra columns (i.e. those accessible in the key proc) would be set to NULL so re-decrypting wouldn't actually succeed.
This patch adds back those extra columns into the 'encryptor_class' so during its slicing of instance variables, those columns would get serialized into the resulting SQL statement and thus wouldn't be set to NULL regardless.