lib/mongoid/kms.rb in mongoid-kms-0.0.24 vs lib/mongoid/kms.rb in mongoid-kms-0.0.25
- old
+ new
@@ -154,10 +154,10 @@
raw = send("kms_secure_#{field_name}")
if raw.nil?
raw
else
- v = self.class.decrypt_field(self, field_name, raw)
+ v = Mongoid::Kms.bson_class::Binary.new(self.class.decrypt_field(self, field_name, raw))
instance_variable_set("@#{field_name}", v)
v
end
end
end