Island: Remove string_encryptor.py

This commit is contained in:
Mike Salvatore 2021-09-21 13:56:19 -04:00
parent 2ddd369afd
commit 627a31c902
2 changed files with 3 additions and 12 deletions

View File

@ -1,14 +1,14 @@
from typing import List
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):
@staticmethod
def encrypt(value: List[str]):
return [string_encryptor.encrypt(string) for string in value]
return [get_encryptor().enc(string) for string in value]
@staticmethod
def decrypt(value: List[str]):
return [string_encryptor.decrypt(string) for string in value]
return [get_encryptor().dec(string) for string in value]

View File

@ -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)