Class: Adamantite::GUI::Request::SetMasterPasswordRequest
- Inherits:
-
Object
- Object
- Adamantite::GUI::Request::SetMasterPasswordRequest
- Defined in:
- lib/gui/request/set_master_password_request.rb
Instance Attribute Summary collapse
-
#new_master_pw ⇒ Object
Returns the value of attribute new_master_pw.
-
#new_master_pw_confirmation ⇒ Object
Returns the value of attribute new_master_pw_confirmation.
-
#success ⇒ Object
Returns the value of attribute success.
Instance Method Summary collapse
Instance Attribute Details
#new_master_pw ⇒ Object
Returns the value of attribute new_master_pw.
6 7 8 |
# File 'lib/gui/request/set_master_password_request.rb', line 6 def new_master_pw @new_master_pw end |
#new_master_pw_confirmation ⇒ Object
Returns the value of attribute new_master_pw_confirmation.
6 7 8 |
# File 'lib/gui/request/set_master_password_request.rb', line 6 def new_master_pw_confirmation @new_master_pw_confirmation end |
#success ⇒ Object
Returns the value of attribute success.
6 7 8 |
# File 'lib/gui/request/set_master_password_request.rb', line 6 def success @success end |
Instance Method Details
#set_master_password! ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/gui/request/set_master_password_request.rb', line 8 def set_master_password! @success = false if @new_master_pw == @new_master_pw_confirmation master_pw_info = generate_master_pw_hash(@new_master_pw) write_pw_to_file('master', password: master_pw_info[:master_pw_hash], salt: master_pw_info[:salt]) @success = true end @success end |