18 lines
455 B
Python
18 lines
455 B
Python
import base64
|
|
|
|
|
|
class WrapperService:
|
|
|
|
@staticmethod
|
|
def wrap_file(file_bytes: bytes) -> str:
|
|
file_encoded_b64 = base64.b64encode(file_bytes)
|
|
print('b64 gemacht')
|
|
print(file_encoded_b64)
|
|
print()
|
|
print('utf8- decodiert')
|
|
print(file_encoded_b64.decode())
|
|
return file_encoded_b64.decode()
|
|
|
|
@staticmethod
|
|
def unwrap_file(file_str: str) -> bytes:
|
|
return base64.b64decode(file_str) |