Refactored code

This commit is contained in:
2021-03-03 10:47:52 +01:00
parent a7c2946ba5
commit 68c136a16f
205 changed files with 2207 additions and 1010 deletions

View File

@@ -0,0 +1,17 @@
import base64
class CredentialManager:
@staticmethod
def encrypt(string: str) -> str:
return base64.b64encode(string.encode('utf-8')).decode('utf-8')
@staticmethod
def decrypt(string: str) -> str:
return base64.b64decode(string).decode('utf-8')
@staticmethod
def build_string(string: str, credentials: str):
return string.replace('$credentials', CredentialManager.decrypt(credentials))