From 39dcf029d5911d9aa97a8c20db7bd0e823a7841b Mon Sep 17 00:00:00 2001 From: Caeden Perelli-Harris Date: Wed, 16 Aug 2023 11:54:04 +0100 Subject: [PATCH 1/2] refactor(ciphers): Delete base85 algorithm --- ciphers/base85.py | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 ciphers/base85.py diff --git a/ciphers/base85.py b/ciphers/base85.py deleted file mode 100644 index afd1aff79d11..000000000000 --- a/ciphers/base85.py +++ /dev/null @@ -1,33 +0,0 @@ -import base64 - - -def base85_encode(string: str) -> bytes: - """ - >>> base85_encode("") - b'' - >>> base85_encode("12345") - b'0etOA2#' - >>> base85_encode("base 85") - b'@UX=h+?24' - """ - # encoded the input to a bytes-like object and then a85encode that - return base64.a85encode(string.encode("utf-8")) - - -def base85_decode(a85encoded: bytes) -> str: - """ - >>> base85_decode(b"") - '' - >>> base85_decode(b"0etOA2#") - '12345' - >>> base85_decode(b"@UX=h+?24") - 'base 85' - """ - # a85decode the input into bytes and decode that into a human readable string - return base64.a85decode(a85encoded).decode("utf-8") - - -if __name__ == "__main__": - import doctest - - doctest.testmod() From 4d4168e9f40ab27d8445af8af475caf5e3b16720 Mon Sep 17 00:00:00 2001 From: github-actions <${GITHUB_ACTOR}@users.noreply.github.com> Date: Wed, 16 Aug 2023 10:54:20 +0000 Subject: [PATCH 2/2] updating DIRECTORY.md --- DIRECTORY.md | 1 - 1 file changed, 1 deletion(-) diff --git a/DIRECTORY.md b/DIRECTORY.md index 8d1567465fbc..fe0a6a9e33ff 100644 --- a/DIRECTORY.md +++ b/DIRECTORY.md @@ -85,7 +85,6 @@ * [Base16](ciphers/base16.py) * [Base32](ciphers/base32.py) * [Base64](ciphers/base64.py) - * [Base85](ciphers/base85.py) * [Beaufort Cipher](ciphers/beaufort_cipher.py) * [Bifid](ciphers/bifid.py) * [Brute Force Caesar Cipher](ciphers/brute_force_caesar_cipher.py)