Module: Lawn
Constant Summary collapse
- VERSION =
"0.0.7"
Instance Method Summary collapse
- #decrypt_password(encryption_password, password) ⇒ Object
- #encrypt_password(encryption_password, password) ⇒ Object
- #get_encryption_password(username) ⇒ Object
- #login(username, password) ⇒ Object
Instance Method Details
#decrypt_password(encryption_password, password) ⇒ Object
19 20 21 |
# File 'lib/lawn.rb', line 19 def decrypt_password(encryption_password, password) EzCrypto::Key.decrypt_with_password encryption_password, "salt", password end |
#encrypt_password(encryption_password, password) ⇒ Object
15 16 17 |
# File 'lib/lawn.rb', line 15 def encrypt_password(encryption_password, password) EzCrypto::Key.encrypt_with_password encryption_password, "salt", password end |
#get_encryption_password(username) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/lawn.rb', line 7 def get_encryption_password(username) if username.length < 7 username << ("!" * 7) else username end end |
#login(username, password) ⇒ Object
23 24 25 |
# File 'lib/lawn.rb', line 23 def login(username, password) `curl -s -f -F username=\'#{username}\' -F password=\'#{password}\' -F iss=\'false\' -F output=\'binary\' https://auth.lawn.gatech.edu/index.php` end |