mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-24 13:01:28 +00:00
31 lines
586 B
Python
31 lines
586 B
Python
"""Handling of local secret used for encrypted backups.
|
|
Separated out for circular dependency reasons
|
|
"""
|
|
|
|
REDIS_KEY = "backup:local_secret"
|
|
|
|
|
|
class LocalBackupSecret:
|
|
@staticmethod
|
|
def get():
|
|
"""A secret string which backblaze/other clouds do not know.
|
|
Serves as encryption key.
|
|
TODO: generate and save in redis
|
|
"""
|
|
return "TEMPORARY_SECRET"
|
|
|
|
@staticmethod
|
|
def reset():
|
|
pass
|
|
|
|
def exists():
|
|
pass
|
|
|
|
@staticmethod
|
|
def _generate():
|
|
pass
|
|
|
|
@staticmethod
|
|
def _store(secret: str):
|
|
pass
|