From 0494d48f84f74145d6eec5e4dab3daad21c490aa Mon Sep 17 00:00:00 2001 From: Christian Bender Date: Mon, 16 Apr 2018 14:18:23 +0200 Subject: [PATCH] added a docstring --- hashes/md5.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/hashes/md5.py b/hashes/md5.py index 3ae13089d..d3f155108 100644 --- a/hashes/md5.py +++ b/hashes/md5.py @@ -2,6 +2,19 @@ from __future__ import print_function import math def rearrange(bitString32): + """[summary] + Regroups the given binary string. + + Arguments: + bitString32 {[string]} -- [32 bit binary] + + Raises: + ValueError -- [if the given string not are 32 bit binary string] + + Returns: + [string] -- [32 bit binary string] + """ + if len(bitString32) != 32: raise ValueError("Need length 32") newString = ""