mirror of
https://github.com/kevinveenbirkenbach/splitted-secret.git
synced 2025-09-09 19:57:17 +02:00
Implemented basic cleanup
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
class AbstractSplittedSecret:
|
||||
from .Cli import Cli
|
||||
|
||||
class AbstractSplittedSecret(Cli):
|
||||
def __init__(self):
|
||||
super(Cli, self).__init__()
|
||||
self.encrypted_splitted_password_files_folder = "data/encrypted/splitted_password_files/"
|
@@ -1,7 +1,10 @@
|
||||
from .AbstractSplittedSecret import AbstractSplittedSecret
|
||||
class Cleanup(AbstractSplittedSecret):
|
||||
def __init__(self):
|
||||
pass
|
||||
super(Cleanup, self).__init__()
|
||||
def deleteAllEncryptedFiles(self):
|
||||
self.executeCommand('rm -v ' + self.encrypted_splitted_password_files_folder + '*')
|
||||
print(self.getCommandString())
|
||||
print(self.getOutputString())
|
||||
def deleteAll(self):
|
||||
|
||||
pass
|
||||
self.deleteAllEncryptedFiles()
|
@@ -24,7 +24,7 @@ class Cli(object):
|
||||
return self.output
|
||||
|
||||
def getOutputString(self):
|
||||
return str(' '.join(self.output))
|
||||
return str('\n'.join(self.output))
|
||||
|
||||
def getCommandString(self):
|
||||
return self.command
|
@@ -3,14 +3,12 @@ import string
|
||||
import math
|
||||
import numpy
|
||||
import re
|
||||
from .Cli import Cli
|
||||
from .AbstractSplittedSecret import AbstractSplittedSecret
|
||||
|
||||
class Generate(AbstractSplittedSecret,Cli):
|
||||
class Generate(AbstractSplittedSecret):
|
||||
|
||||
def __init__(self, amount_of_secret_holders, decryption_quota):
|
||||
super(Generate, self).__init__()
|
||||
super(Cli, self).__init__()
|
||||
self.amount_of_secret_holders = amount_of_secret_holders
|
||||
self.decryption_quota = decryption_quota
|
||||
self.decrypted_master_password_file_path="data/decrypted/password_files/master-password.txt"
|
||||
|
Reference in New Issue
Block a user