added work on faster and safer database for blocks and general KV

This commit is contained in:
Kevin Froman 2020-12-31 03:59:26 +00:00
parent 1a59a465c0
commit bb9ec188e0
4 changed files with 24 additions and 3 deletions

View File

@ -38,3 +38,5 @@ ephemeral_services_file = home + 'ephemeral-services.list'
restarting_indicator = home + "is-restarting"
secure_erase_key_file = home + "erase-key"
master_db_location = home + "database/"

View File

@ -2,6 +2,8 @@ from typing import Union
from enum import Enum, auto
import dbm
from filenuke import nuke
from .securestring import generate_key_file, protect_string, unprotect_string

View File

@ -1,4 +1,6 @@
"""Wrap RinseOff, a c# CLI tool for secure data erasure via a keyfile.
"""Onionr - Private P2P Communication
Wrap RinseOff, a c# CLI tool for secure data erasure via a keyfile.
Intended for encrypting database entries.
@ -6,7 +8,6 @@ It is quite slow since it spawns an external process,
but an ext process is necessary to keep the key out
of memory as much as possible
"""
import os
from typing import Union
@ -14,6 +15,21 @@ import subprocess
from filepaths import secure_erase_key_file, app_root
import logger
"""
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
_rinseoff = f"{app_root}/src/rinseoff/rinseoffcli"

View File

@ -36,7 +36,8 @@ def create_dirs():
order of the hardcoded list below,
then trigger creation of DBs"""
gen_dirs = [home, filepaths.block_data_location,
filepaths.contacts_location, filepaths.export_location]
filepaths.contacts_location, filepaths.export_location,
filepaths.master_db_location]
for path in gen_dirs:
if not os.path.exists(path):
os.makedirs(path)