forked from p15670423/monkey
Island: Remove string_encryptor.py
This commit is contained in:
parent
2ddd369afd
commit
627a31c902
|
@ -1,14 +1,14 @@
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
from monkey_island.cc.models.utils.field_encryptors.i_field_encryptor import IFieldEncryptor
|
from monkey_island.cc.models.utils.field_encryptors.i_field_encryptor import IFieldEncryptor
|
||||||
from monkey_island.cc.server_utils.encryption import string_encryptor
|
from monkey_island.cc.server_utils.encryptor import get_encryptor
|
||||||
|
|
||||||
|
|
||||||
class StringListEncryptor(IFieldEncryptor):
|
class StringListEncryptor(IFieldEncryptor):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def encrypt(value: List[str]):
|
def encrypt(value: List[str]):
|
||||||
return [string_encryptor.encrypt(string) for string in value]
|
return [get_encryptor().enc(string) for string in value]
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def decrypt(value: List[str]):
|
def decrypt(value: List[str]):
|
||||||
return [string_encryptor.decrypt(string) for string in value]
|
return [get_encryptor().dec(string) for string in value]
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
from monkey_island.cc.server_utils.encryptor import get_encryptor
|
|
||||||
|
|
||||||
|
|
||||||
def encrypt(cleartext: str) -> str:
|
|
||||||
return get_encryptor().enc(cleartext)
|
|
||||||
|
|
||||||
|
|
||||||
def decrypt(cyphertext: str) -> str:
|
|
||||||
return get_encryptor().dec(cyphertext)
|
|
Loading…
Reference in New Issue