From 54001c7a787b908965fff686cc34af9a53d921cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 14 Apr 2020 21:49:11 +0200 Subject: [PATCH] bpo-9216: Nobody expects the geohashing FIPS inquisition (GH-19520) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automerge-Triggered-By: @tiran (cherry picked from commit 4c0a31fb08407ba043688ad1c21102dd4cb99146) Co-authored-by: Miro HronĨok --- Lib/antigravity.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/antigravity.py b/Lib/antigravity.py index c6f174ca6d87369..6dc520733577af6 100644 --- a/Lib/antigravity.py +++ b/Lib/antigravity.py @@ -12,6 +12,6 @@ def geohash(latitude, longitude, datedow): ''' # https://xkcd.com/426/ - h = hashlib.md5(datedow).hexdigest() + h = hashlib.md5(datedow, usedforsecurity=False).hexdigest() p, q = [('%f' % float.fromhex('0.' + x)) for x in (h[:16], h[16:32])] print('%d%s %d%s' % (latitude, p[1:], longitude, q[1:]))