mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-13 01:48:31 +02:00
more cleanup
This commit is contained in:
parent
62b733729e
commit
3624bde2c0
1 changed files with 7 additions and 9 deletions
|
@ -12,16 +12,14 @@ class EncryptionMethods(str, Enum):
|
|||
JRNLV2 = "Jrnlv2Encryption"
|
||||
|
||||
|
||||
def determine_encryption_method(config: str | bool) -> BaseEncryption:
|
||||
ENCRYPTION_METHODS = {
|
||||
# config: classname (as string)
|
||||
True: EncryptionMethods.JRNLV2, # the default
|
||||
False: EncryptionMethods.NONE,
|
||||
"jrnlv1": EncryptionMethods.JRNLV1,
|
||||
"jrnlv2": EncryptionMethods.JRNLV2,
|
||||
}
|
||||
|
||||
|
||||
def determine_encryption_method(config: str | bool) -> BaseEncryption:
|
||||
key = config
|
||||
if isinstance(config, str):
|
||||
key = config.lower()
|
||||
|
|
Loading…
Add table
Reference in a new issue