Skip to content

Commit

Permalink
0.4.1 changes
Browse files Browse the repository at this point in the history
Rearranged keyword arguments

Rearranged keyword arguments
  • Loading branch information
mandeep committed Dec 31, 2016
1 parent 798aa73 commit 4b9958d
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 10 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,25 @@ Additions
- Operations on keys
- Ability to minimize to system tray

0.4.1 - 2016-12-31
==================

Wrapper
-------

Added
~~~~~

- KDF iterations in forge_tomb function

GUI
---

Fixed
~~~~~

- KDF iterations now working

0.4.0 - 2016-12-30
==================

Expand Down
14 changes: 7 additions & 7 deletions mausoleum/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,15 @@ def create_defined_tomb(self):
forge_command = wrapper.forge_tomb(self.key_name.text(),
self.key_password.text(),
self.path,
self.sudo_password.text(),
debug=self.random_checkbox.isChecked(),
kdf=self.kdf_box.value())
kdf=self.kdf_box.value(),
sudo=self.sudo_password.text(),
debug=self.random_checkbox.isChecked())

lock_command = wrapper.lock_tomb(self.tomb_name.text(),
self.key_name.text(),
self.key_password.text(),
self.path,
self.sudo_password.text())
sudo=self.sudo_password.text())

if (dig_command == 0 and forge_command[0] is not None and
lock_command[0] is not None):
Expand All @@ -158,7 +158,7 @@ def create_defined_tomb(self):
self.key_name.text(),
self.key_password.text(),
self.path,
self.sudo_password.text())
sudo=self.sudo_password.text())

if open_command[0] is not None:
self.message.setText('Tomb Opened Successfully')
Expand Down Expand Up @@ -270,8 +270,8 @@ def open_selected_tomb(self):
self.key_path.text(),
self.key_password.text(),
self.path,
self.sudo_password.text(),
read_only=self.read_only_checkbox.isChecked())
read_only=self.read_only_checkbox.isChecked(),
sudo=self.sudo_password.text())
if open_command[0] is not None:
self.message.setText('Tomb Opened Successfully')
self.tomb_path.clear()
Expand Down
7 changes: 4 additions & 3 deletions mausoleum/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def dig_tomb(name, size, path='tomb'):
return subprocess.call([path, 'dig', '-s', str(size), name])


def forge_tomb(key, password, path='tomb', sudo=None, debug=False, kdf=0):
def forge_tomb(key, password, path='tomb', kdf=0, sudo=None, debug=False):
"""Forge a new key for a tomb container.
Positional arguments:
Expand All @@ -25,6 +25,7 @@ def forge_tomb(key, password, path='tomb', sudo=None, debug=False, kdf=0):
Keyword arguments:
path -- the path to the tomb executable
kdf -- number of KDF iterations to perform, default is 0
sudo -- the sudo password of the current admin, default is None
debug -- used to test key generation
"""
Expand Down Expand Up @@ -84,7 +85,7 @@ def construct_tomb(name, size, key, password, debug=False):
lock_tomb(name, key, password)


def open_tomb(name, key, password, path='tomb', sudo=None, read_only=False):
def open_tomb(name, key, password, path='tomb', read_only=False, sudo=None):
"""Open a tomb container with the given key.
Positional arguments:
Expand All @@ -94,8 +95,8 @@ def open_tomb(name, key, password, path='tomb', sudo=None, read_only=False):
Keyword arguments:
path -- the path to the tomb executable
sudo -- the sudo password of the current admin, default is None
read_only -- mount the tomb as read only
sudo -- the sudo password of the current admin, default is None
"""
arguments = ['sudo', '--stdin', path, 'open', '--unsafe',
'--tomb-pwd', password, name, '-k', key]
Expand Down

0 comments on commit 4b9958d

Please sign in to comment.