Created
March 9, 2022 07:28
-
-
Save llluksa/8dbcdea82312ddde5e78437e7b31f8b1 to your computer and use it in GitHub Desktop.
[Python] #python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def base_encode(self, secret_value): | |
| """ | |
| Return base64 encoded string | |
| """ | |
| message_bytes = secret_value.encode('ascii') | |
| base64_bytes = base64.b64encode(message_bytes) | |
| base64_message = base64_bytes.decode('ascii') | |
| return base64_message |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment