Guest User

Untitled

a guest
Apr 23rd, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. class InputSource
  2.  
  3. def initialize(cookies)
  4.  
  5. @key = nil
  6. @identifier = nil
  7. hashob = Digest::SHA1.new();
  8. @key = hashob.update(Time.now.to_s + rand(10000).to_s + SALT).to_s
  9. hashob = Digest::SHA1.new();
  10. @identifier = hashob.update(Time.now.to_s + rand(10000).to_s + SALT).to_s
  11. @key = cookies[:_iaql] unless cookies[:_iaql].nil?
  12. @identifier = cookies[:_owsk] unless cookies[:_owsk].nil?
  13.  
  14. end
  15.  
  16. def getKey
  17. @key
  18. end
  19.  
  20. def getIdentifier
  21. @identifier
  22. end
  23. end
Add Comment
Please, Sign In to add comment