Class: FanGem
- Inherits:
-
Object
- Object
- FanGem
- Defined in:
- lib/fan.rb
Instance Attribute Summary collapse
-
#password ⇒ Object
Returns the value of attribute password.
Class Method Summary collapse
Instance Attribute Details
#password ⇒ Object
Returns the value of attribute password.
4 5 6 |
# File 'lib/fan.rb', line 4 def password @password end |
Class Method Details
.hash_with_salt(password = "", salt = "") ⇒ Object
12 13 14 15 16 |
# File 'lib/fan.rb', line 12 def self.hash_with_salt(password="", salt="") puts Digest::SHA1.hexdigest("Put #{salt} on the #{password}") Digest::SHA1.hexdigest("Put #{salt} on the #{password}") end |
.make_salt(username = "") ⇒ Object
7 8 9 10 |
# File 'lib/fan.rb', line 7 def self.make_salt(username="") puts Digest::SHA1.hexdigest("Use #{username} with #{Time.now} to make salt") Digest::SHA1.hexdigest("Use #{username} with #{Time.now} to make salt") end |