Closed aureliencarle closed 2 years ago
The Touch method should not write down the passwords and read the file again.
It simply should add an item in the session.content
attribute, after a simple PasswordData
construction. Something like
passwd = PassworDataIO.input()
shell.session.add_password(passwd)
The add_password()
method would have to be defined
Finally, the conversion of passwords into the encrypted file should happen when the session closes.
BTW this should be the responsibility of the PasswordDataIO
class (move the convert()
method from PasswordData
and call it write_password()
or something like that).
After all this is done, the Rm
class should at least be able to simply remove a password from its key, e.g.
shell.session.remove_password(pass_label)
The remove_password()
method should be implemented
High probability that we have a problem with rm -r machin
cause of the option before parameter ..
Indeed. A more sophisticated parser will have to be implemented.. Deserves its own PR probably
Implemented successfully in PR #20
For starters, the following 2 lines in the
Touch
command class should be replaced: https://github.com/aureliencarle/cryptext/blob/a2a3337538a9373997a053191e34d2f73f787ce2/src/commands/touch.py#L17