Skip to content

Commit 27bed0d

Browse files
committed
add 'to_base_64'
1 parent 6a75861 commit 27bed0d

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ build/
44
cryptolib/__pycache__/
55
cryptolib.egg-info/
66
dist/
7+
tests/__pycache__/

cryptolib/serializers.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ def encrypt(self, unencrypted_text: str) -> bytes:
3535
def to_base_85(serializable: Union[str, bytes]) -> bytes:
3636
return base64.a85encode(serializable)
3737

38+
@staticmethod
39+
def to_base_64(serializable: Union[str, bytes]) -> bytes:
40+
return base64.b64encode(serializable)
41+
3842

3943
class Decoder(CryptoBase):
4044
def __init__(self, private_key: str):

0 commit comments

Comments
 (0)