Class: Alchemy::PictureAttributes
- Inherits:
-
Object
- Object
- Alchemy::PictureAttributes
- Defined in:
- lib/alchemy/picture_attributes.rb
Overview
Provides methods to secure your picture attributes against DOS attacks.
Constant Summary collapse
- SECURE_ATTRIBUTES =
%w(id size crop crop_from crop_size quality upsample).freeze
Class Method Summary collapse
-
.secure(attributes) ⇒ String
Secures given attributes.
Class Method Details
.secure(attributes) ⇒ String
Secures given attributes
15 16 17 |
# File 'lib/alchemy/picture_attributes.rb', line 15 def secure(attributes) Digest::SHA1.hexdigest(joined_attributes(attributes))[0..15] end |