From 1d90ffc2f238299ffe6325dc0d6b8b126dd327f8 Mon Sep 17 00:00:00 2001 From: Val Date: Fri, 2 Sep 2022 06:23:25 -0500 Subject: [PATCH] Move this to a new folder for bad python --- .../Code/{hashbrek.py => crappy_python/hashfunc.py} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename 17-Chernobyl/Code/{hashbrek.py => crappy_python/hashfunc.py} (80%) diff --git a/17-Chernobyl/Code/hashbrek.py b/17-Chernobyl/Code/crappy_python/hashfunc.py similarity index 80% rename from 17-Chernobyl/Code/hashbrek.py rename to 17-Chernobyl/Code/crappy_python/hashfunc.py index d24be9f..86538b5 100644 --- a/17-Chernobyl/Code/hashbrek.py +++ b/17-Chernobyl/Code/crappy_python/hashfunc.py @@ -1,11 +1,11 @@ #!/usr/bin/env python3 # TODO: Actually break the hashes? -# May not be necessary, just gotta find a way to crash it. Harumph. +# TODONE in chernobreak.py -def hash(byts): +def hash(chars): ret = 0; - for c in byts: + for c in chars: ret += c ret = ((ret << 5) - ret) & 0xffff return ret