lib/lockbox/encryptor.rb in lockbox-0.3.7 vs lib/lockbox/encryptor.rb in lockbox-0.4.0
- old
+ new
@@ -80,27 +80,7 @@
File.basename(source.path)
end
target.content_type = source.content_type if source.respond_to?(:content_type)
target.set_encoding(source.external_encoding) if source.respond_to?(:external_encoding)
end
-
- # TODO remove in 0.4.0
- # legacy for attr_encrypted
- def self.encrypt(options)
- box(options).encrypt(options[:value])
- end
-
- # TODO remove in 0.4.0
- # legacy for attr_encrypted
- def self.decrypt(options)
- box(options).decrypt(options[:value])
- end
-
- # TODO remove in 0.4.0
- # legacy for attr_encrypted
- def self.box(options)
- options = options.slice(:key, :encryption_key, :decryption_key, :algorithm, :previous_versions)
- options[:algorithm] = "aes-gcm" if options[:algorithm] == "aes-256-gcm"
- Lockbox.new(options)
- end
end
end