Closed jersingh closed 4 years ago
Any takers?
I've posted on SO if that is a more appropriate place to ask for help.
Did you change the column to "string" ? each column should be in string format even when other format. May I ask how did you implement the gem? Im trying to implement myself but getting ArgumentError: Unknown type :encrypted
for attribute :name, :encrypted, random_iv: false, type: :string
and havent not been able to resolve this.
@michaelsalexander83 I do have my column type set to string.
I basically followed instructions here but this is how I set things up. I'm using version 4.3.0:
$ gem install symmetric-encryption
$ symmetric-encryption --generate --app-name your_app_name --environments "production"
I was then able to encrypt anything I needed to but :decimal fields.
Here's a sample of how I set up one of my models:
if Rails.application.config.encryption_mode # I set this in my environments
# these work just dandy
attribute :dob, :encrypted, random_iv: true, type: :date
attribute :customer_since, :encrypted, random_iv: true, type: :date
attribute :years_at_previous_residence, :encrypted, random_iv: true, type: :integer
# fails with: wrong number of arguments (given 1, expected 0)
# attribute :rent_amount, :encrypted, random_iv: false, type: :decimal
end
Hope this helps!
Just a quick note. No disrespect intended to the contributors, but I'm a little disappointed not one of the nineteen contributors can jump in to help. I understand the open source software process is a volunteer system and the time and effort involved in producing such a quality gem as this is greatly appreciated, but a system as critical as encryption is really important. I may need to use another library if I can't get my issue resolved.
Cheers!
Just a quick note. No disrespect intended to the contributors, but I'm a little disappointed not one of the nineteen contributors can jump in to help. I understand the open source software process is a volunteer system and the time and effort involved in producing such a quality gem as this is greatly appreciated, but a system as critical as encryption is really important. I may need to use another library if I can't get my issue resolved.
Wow, such a typical response from an over entitled late adopter. This gem was written and is maintained by exactly 1 person in his "free" time. All other contributions are from people that instead of abusing the author, took the took the time and contributed by submitting a pull request.
Please use some other gem since you clearly do not appreciate the "free" time I put in to creating and maintaining this open source gem.
Encrypting many fields successfully in a model/table (PostgreSQL) with various types: :string, :boolean, :integer, and :date. I have one field that is :decimal type and it's the only field that fails when updating.
I'm calling some ajax to save individual attributes like this:
Stack trace caught in a rescue block when saving the :decimal:
Here's my rails model symmetric-encryption definition:
I can change the type to :integer or :float and updates without issue. Just cannot save a :decimal.
My environment: