Class: Paperdragon::Paperclip::Uid::HashKey
- Inherits:
-
Object
- Object
- Paperdragon::Paperclip::Uid::HashKey
- Defined in:
- lib/paperdragon/paperclip.rb
Overview
“:class/:attachment/:id/:style/:updated_at”
Class Method Summary collapse
-
.call(secret, class_name, attachment, id, style, updated_at) ⇒ Object
cover_girls/images/4841/thumb/1402617353.
Class Method Details
.call(secret, class_name, attachment, id, style, updated_at) ⇒ Object
cover_girls/images/4841/thumb/1402617353
58 59 60 61 62 |
# File 'lib/paperdragon/paperclip.rb', line 58 def self.call(secret, class_name, , id, style, updated_at) data = "#{class_name}/#{}/#{id}/#{style}/#{updated_at}" # puts "[Paperdragon] HashKey <--------------------- #{data}" OpenSSL::HMAC.hexdigest(OpenSSL::Digest::SHA1.new, secret, data) end |