From 263e287559a3fbe1b2e607c7ad0b0e44a328028f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Bonhomme?= Date: Mon, 20 Feb 2017 12:16:24 +0100 Subject: [PATCH] clean code related to tools.binary2base64 and tools.base642binary functions. --- stegano/tools.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/stegano/tools.py b/stegano/tools.py index 3ed74c0..0a88b66 100755 --- a/stegano/tools.py +++ b/stegano/tools.py @@ -91,24 +91,12 @@ def binary2base64(binary_file): fin = open(binary_file, "rb") binary_data = fin.read() fin.close() - # Encode binary to base64 string (printable) return base64.b64encode(binary_data) - """fout = open(output_file, "w") - fout.write(b64_data) - fout.close""" - def base642binary(b64_fname): """ Convert a printable file to a binary file. """ - # Read base64 string - #fin = open(b64_fname, "r") - #b64_str = fin.read() - #fin.close() - # Decode base64 string to original binary sound object b64_fname += b'===' return base64.decodestring(b64_fname) - - #return base64.b64decode(b64_fname)