Module: Cookies
- Extended by:
- ActiveSupport::Concern
- Included in:
- ApplicationController
- Defined in:
- app/controllers/concerns/cookies.rb
Instance Method Summary collapse
Instance Method Details
#digest_cookie(file, key) ⇒ Object
4 5 6 7 |
# File 'app/controllers/concerns/cookies.rb', line 4 def (file, key) sha256 = Digest::SHA256.file(file) [key] = sha256.hexdigest end |
#digested_cookie_exists?(file, key) ⇒ Boolean
9 10 11 12 |
# File 'app/controllers/concerns/cookies.rb', line 9 def (file, key) sha256 = Digest::SHA256.file(file) [key] == sha256.hexdigest end |