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
13 14 15 |
# File 'lib/alchemy/picture_attributes.rb', line 13 def secure(attributes) Digest::SHA1.hexdigest(joined_attributes(attributes))[0..15] end |